Skip to content

Instantly share code, notes, and snippets.

@jsonw23
Last active June 23, 2020 06:04
Show Gist options
  • Save jsonw23/2253b005268ff41dd0adeb551a199c64 to your computer and use it in GitHub Desktop.
Save jsonw23/2253b005268ff41dd0adeb551a199c64 to your computer and use it in GitHub Desktop.
Add an environment variable to the function
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: hello_world/
Handler: app.lambda_handler
Runtime: python3.8
# add an environment variable so the code can get the table name
Environment:
Variables:
TABLE_NAME: !Ref MyTable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment