Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Append CodeSha256 Value to Description #3337

Merged
merged 7 commits into from
Sep 5, 2023

Conversation

GavinZZ
Copy link
Contributor

@GavinZZ GavinZZ commented Sep 5, 2023

Issue #, if available

Description of changes

Append the value of CodeSha256 to end of Lambda Function description. This would cause an update to the existing users who use codesha256 but since it will always create a new lambda version, it wouldn't cause any downtime for users.

When you deploy a new version of an AWS Lambda function, it does not cause downtime for the existing function. AWS Lambda is designed to allow seamless deployments without affecting the current running version

Additionally add DeletionPolicy and UpdateReplacePolicy to an integ test.

Description of how you validated changes

All tests passed.

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be
added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@GavinZZ GavinZZ marked this pull request as ready for review September 5, 2023 18:18
@GavinZZ GavinZZ requested a review from a team as a code owner September 5, 2023 18:18
Copy link
Contributor

@ssenchenko ssenchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand it correctly that you're saying that updating Descriptionwill cause redeployment?

samtranslator/model/sam_resources.py Show resolved Hide resolved
@SimonCMoore
Copy link

How about adding a test for when there is already a description and one for a description with an intrinsic in it?

@GavinZZ
Copy link
Contributor Author

GavinZZ commented Sep 5, 2023

Added

@GavinZZ GavinZZ enabled auto-merge (squash) September 5, 2023 19:19
@GavinZZ GavinZZ merged commit 0900f2b into aws:develop Sep 5, 2023
8 checks passed
@ramosbugs
Copy link

Btw, this was a breaking change since this caused some of our Lambda function descriptions to now be longer than the max length of 256, and deployment failed. Now we have to shorten our descriptions to compensate... something to be aware of for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants