sam should only deploy a new version if code or relevant config has changed
See original GitHub issueDescription:
I have a function described in template.yaml. I have AutoPublishAlias w/ Provisioned Concurrency enabled. I deploy and stack and it creates and completes. I add a cloudwatch alarm to template.yaml. I deploy and the changeset says it’s going to deploy a version of the lambda, even though nothing changed for the code or config. I deploy and it creates the new version of the lambda and adds the alarm. I remove the alarm from template.yaml, and deploy and it yet again wants to deploy a new version of the lambda, while also removing the alarm.
Expected result:
If the code or config for the lambda doesn’t change, no new version should be deployed. Just make changes to the other resources in template.yaml as needed.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: macOS Big Sur 11.3.1
sam --version
:S AM CLI, version 1.23- AWS region: us-west-2
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
sam should only deploy a new version if code or relevant config has ...
CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM - sam should only deploy a new version if code...
Read more >sam deploy - AWS Serverless Application Model
Deploys an AWS SAM application. By default when you use this command, the AWS SAM CLI assumes that your current working directory is...
Read more >Updates to sam package and deploy in SAM CLI >= 0.33.1
A look at changes to sam package and deploy in SAM CLI 0.33.1 and other updates since parts I, II and III of...
Read more >How to setup a Serverless application with AWS SAM and ...
AWS Serverless Application Model (SAM) is used to quickly create Serverless applications with support for;. local development that emulates AWS ...
Read more >terraform-aws-modules/lambda/aws
Typically, Lambda Function resource updates when source code changes. If publish = true is specified a new Lambda Function version will also be ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the suggestion. We are also exploring other options like excluding certain directories and files in
CodeUri
, liketemplate.yaml
in your case.I am closing this for now. Please let us know if you experience further issues.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.