Last active
September 9, 2023 20:37
-
-
Save pierreis/ca0c4fbe3a1f60a5729d386511d37fd8 to your computer and use it in GitHub Desktop.
AWS SAM Deploy Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: Test API | |
Parameters: | |
Stage: | |
Type: String | |
AllowedValues: | |
- dev | |
- sat | |
- demo | |
- staging | |
- prod | |
Description: Enter dev, sat, demo, staging or prod | |
Resources: | |
MyApi: | |
Type: AWS::Serverless::Api | |
Properties: | |
StageName: !Ref Stage | |
EndpointConfiguration: PRIVATE | |
DefinitionBody: | |
swagger: '2.0' | |
x-amazon-apigateway-policy: | |
Version: '2012-10-17' | |
Statement: | |
- Effect: Allow | |
Principal: "*" | |
Action: execute-api:Invoke | |
Resource: | |
- !Sub arn:aws:execute-api:*:*:*/${Stage}/* | |
ThumbnailFunction: | |
Type: 'AWS::Serverless::Function' | |
Properties: | |
Runtime: nodejs8.10 | |
Handler: get-config.handler | |
CodeUri: ./functions | |
Events: | |
ThumbnailApi: | |
Type: Api | |
Properties: | |
RestApiId: !Ref MyApi | |
Path: /thumbnail | |
Method: GET |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment