aws-samples / aws-samples/aws-sam-terraform-examples

How to deploy code change? Example doesn't deploy if just an application code change.

Open
#10 3 comments 0 reactions 0 assignees View on GitHub
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:

![image](https://github.com/aws-samples/aws-sam-terraform-examples/assets/1504756/b98d9837-01c7-4206-b5a3-39a5d989fdfe)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.