Created
July 4, 2019 00:06
-
-
Save pvgomes/59632c00d3216fd78769492d6f82e130 to your computer and use it in GitHub Desktop.
SAM template for symfony with bref on AWS Lambda
This file contains 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 | |
Globals: | |
Function: | |
Environment: | |
Variables: | |
APP_ENV: prod | |
Resources: | |
Website: | |
Type: AWS::Serverless::Function | |
Properties: | |
FunctionName: 'symfony-Serverless' | |
CodeUri: . | |
Handler: public/index.php | |
Timeout: 30 # in seconds (API Gateway has a timeout of 30 seconds) | |
MemorySize: 1024 | |
Runtime: provided | |
Layers: | |
- 'arn:aws:lambda:us-east-1:209497400698:layer:php-73-fpm:7' | |
Events: | |
HttpRoot: | |
Type: Api | |
Properties: | |
Path: / | |
Method: ANY | |
HttpSubPaths: | |
Type: Api | |
Properties: | |
Path: /{proxy+} | |
Method: ANY | |
Console: | |
Type: AWS::Serverless::Function | |
Properties: | |
FunctionName: 'symfony-console' | |
CodeUri: . | |
Handler: bin/console | |
Timeout: 120 # in seconds | |
Runtime: provided | |
Layers: | |
- 'arn:aws:lambda:us-east-1:209497400698:layer:php-73:7' # PHP | |
- 'arn:aws:lambda:us-east-1:209497400698:layer:console:7' # The "console" layer | |
Outputs: | |
DemoApi: | |
Description: 'URL of our function in the *Prod* environment' | |
Value: !Sub 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment