Last active
June 24, 2020 03:13
-
-
Save jsonw23/b194ce9606f9c6addbec4c5a54a9a256 to your computer and use it in GitHub Desktop.
Add deployment stage as an environment variable
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
| Resources: | |
| HelloWorldFunction: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| CodeUri: hello_world/ | |
| Handler: app.lambda_handler | |
| Runtime: python3.8 | |
| Environment: | |
| Variables: | |
| # add a variable with the value of the DeploymentStage template parameter | |
| STAGE: !Ref DeploymentStage | |
| TABLE_NAME: !Ref MyTable | |
| Policies: | |
| - DynamoDBReadPolicy | |
| TableName: !Ref MyTable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment