aws-samples / aws-samples/aws-sam-terraform-examples
How to deploy code change? Example doesn't deploy if just an application code change.
- Dominant language
- HCL
- Stars
- 57
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
I was able to deploy with Terraform the example at zip_based_lambda_functions/lambda-example/main.tf. However, if I just change a line in the zip_based_lambda_functions/api-lambda-dynamodb-example/src/index.py and do another `terraform apply`, the output rebuilds the file, yes, but it never deploys it.
This article doesn't suggest how to deploy changes.
https://aws.amazon.com/blogs/compute/better-together-aws-sam-cli-and-hashicorp-terraform/
Here is the tail of an apply:

Contributor guide
Research direction
Start with zip_based_lambda_functions/lambda-example/main.tf and zip_based_lambda_functions/api-lambda-dynamodb-example/src/index.py, then reproduce the reported behavior with terraform apply after changing a line. Document the steps or configuration needed for an application-code change to deploy, and verify that the documented workflow updates the deployed function.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python, terraform
- Domain
- cloud, devops, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100