feat: Add error annotation when a deprecated lambda runtime is used#1007
Merged
feat: Add error annotation when a deprecated lambda runtime is used#1007
Conversation
Member
Author
|
Raised this as a way to test #1006 hasn't negatively impacted the release process. |
jacobwinch
reviewed
Dec 23, 2021
| Runtime.NODEJS_6_10, | ||
| Runtime.NODEJS_8_10, | ||
| Runtime.NODEJS_10_X, | ||
| Runtime.NODEJS_12_X, |
Contributor
There was a problem hiding this comment.
IIUC, this version becomes EOL on 2022-04-30 - do we want to deprecate it before then?
Member
Author
There was a problem hiding this comment.
Ah, I thought it was already deprecated! I think it's fine to do so before then as:
- We're not blocking the synth step
- It acts as a reminder to update before the deadline
- There aren't too many lambdas defined using GuCDK today (and 0 using this version of the library)
Contributor
I guess this is something that we (or the Security team) might want to consider in the future but I think it's better to start with this less disruptive approach. |
jacobwinch
approved these changes
Dec 23, 2021
Contributor
|
🎉 This PR is included in version 32.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
akash1810
added a commit
that referenced
this pull request
Aug 18, 2022
Since it was originally introduced in #1007, AWS CDK has added native deprecation annotations to runtimes in aws/aws-cdk#19938 AWS CDK. The means we can remove some code!
2 tasks
akash1810
added a commit
that referenced
this pull request
Aug 18, 2022
Since it was originally introduced in #1007, AWS CDK has added native deprecation annotations to runtimes in aws/aws-cdk#19938. The means we can remove some code!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
We should never use a deprecated or non-LTS runtime for lambdas. In this change, we add an error annotation to this effect.
Note: the annotation does not prevent the stack from being synthesised, to do this, we'd want to
throw. I'm not sure if that's desirable behaviour atm though?How to test
See added tests.
How can we measure success?
We are discouraged from using deprecated or non-LTS lambda runtimes.
Have we considered potential risks?
We have to maintain the
DEPRECATED_RUNTIMESlist.Checklist
Footnotes
Consider whether this is something that will mean changes to projects that have already been migrated, or to the CDK CLI tool. If changes are required, consider adding a checklist here and/or linking to related PRs. ↩
If you are adding a new construct or pattern, has new documentation been added? If you are amending defaults or changing behaviour, are the existing docs still valid? ↩