bug: AwsSolutions-L1 issue with Python runtime 3.12 #1685
Labels
bug
Something isn't working
needs-reproduction
This issue needs reproduction
response-requested
waiting on additional information or feedback
What is the problem?
Using Lambda with runtime 3.12 results AwsSolutions-L1 issue.
Reproduction Steps
Create a stack with:
const pythonCode = `
Replace this with your actual Python code
def handler(event, context):
message = "Hello from an inlined Python Lambda!"
return {"message": message}
`;
const myLambda = new lambda.Function(this, 'IotCertificateCustomResource', {
runtime: lambda.Runtime.PYTHON_3_12,
role: iotCertCustomResourceRole,
code: lambda.Code.fromInline(path.resolve(__dirname, './lambda/iot_certificate')),
handler: 'main.handler'
});
What did you expect to happen?
The AwsSolutions-L1 finding should not happen as the python 3.12 is the latest.
What actually happened?
AwsSolutions-L1 error wsa reported
cdk-nag version
2.28.109
Language
Typescript
Other information
These are the runtimes considered during execution:
[
{ value: 'python2.7', family: 'python', version: '2.7' },
{ value: 'python3.6', family: 'python', version: '3.6' },
{ value: 'python3.7', family: 'python', version: '3.7' },
{ value: 'python3.8', family: 'python', version: '3.8' },
{ value: 'python3.9', family: 'python', version: '3.9' },
{ value: 'python3.10', family: 'python', version: '3.10' },
{ value: 'python3.11', family: 'python', version: '3.11' }
]
The python3.12 is missing from the list and the code https://github.com/cdklabs/cdk-nag/blob/main/src/rules/lambda/LambdaLatestVersion.ts pickes the 3.11 as latest.
The text was updated successfully, but these errors were encountered: