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

bug: AwsSolutions-L1 flags Python 3.11 runtime as not the latest #1528

Open
hearde opened this issue Dec 7, 2023 · 6 comments
Open

bug: AwsSolutions-L1 flags Python 3.11 runtime as not the latest #1528

hearde opened this issue Dec 7, 2023 · 6 comments
Labels
other This issue doesn't fit into the other categories

Comments

@hearde
Copy link

hearde commented Dec 7, 2023

What is the problem?

AwsSolutions-L1 flags Python 3.11 runtime as not the latest. 3.11 is the latest supported runtime.

Reproduction Steps

Create a Lambda function with the Python 3.11 runtime, synth.

What did you expect to happen?

Success.

What actually happened?

[Error at <path>] AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions.

cdk-nag version

2.27.173

Language

Typescript

Other information

No response

@hearde hearde added bug Something isn't working needs-triage This issue or PR still needs to be triaged. labels Dec 7, 2023
@dontirun
Copy link
Collaborator

dontirun commented Dec 7, 2023

What version of the CDK are you using? Can you post a snippet of code to reproduce the issue?

@dontirun dontirun removed the needs-triage This issue or PR still needs to be triaged. label Dec 7, 2023
@hearde
Copy link
Author

hearde commented Dec 7, 2023

CDK version 2.114.1. Looks like I'm not the only one who was run into this.

new PythonFunction(this, "id", {
  entry: "app",
  runtime: Runtime.PYTHON_3_11,
});

@dontirun
Copy link
Collaborator

dontirun commented Dec 7, 2023

Related to this issue aws/aws-cdk#26451 . It looks like the CDK released the Python 3.12 runtime early. cdk-nag sources runtimes from the CDK so it looks like 3.11 isn't the latest version

@dontirun dontirun added other This issue doesn't fit into the other categories and removed bug Something isn't working labels Dec 7, 2023
@clueleaf
Copy link
Contributor

It looks like Python 3.12 is released now.
https://aws.amazon.com/blogs/compute/python-3-12-runtime-now-available-in-aws-lambda/

@mrgrain
Copy link

mrgrain commented Jan 9, 2024

@dontirun Do you have plans to replace this rule with one that instead checks that no deprecated runtime is used?

@dontirun
Copy link
Collaborator

dontirun commented Jan 9, 2024

@mrgrain I would like to add a prebuilt rule for deprecated runtimes. My personal opinion is that a deprecated runtimes rule would be more useful, however, that rule would not replace AwsSolutions-L1 unless the guidance for AWS Solutions changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other This issue doesn't fit into the other categories
Projects
None yet
Development

No branches or pull requests

4 participants