Adding environment variables to Lambda function resource using SAM
An example of how to add Lambda function in template.yaml of your SAM configuration
The first two variables in the example are static. But you can also create a dynamic variables based on the resources you already described. In SOME_DYNAMIC_VAR
variable you can see an example on getting your DynamoDB table name dynamically and passing it to your Lambda function.
More info on the available properties for the Lambda function creation is here. I use CDK documentation, as I have not found related to SAM resources.
PreviousSchema to create Lambda function resource using SAMNextAdding a scheduled timer to start Lambda function resource using SAM
Last updated