From 8d07b857aec64211054e409a098a841ac57d9e09 Mon Sep 17 00:00:00 2001 From: Sumu Pitchayan <35242245+sumupitchayan@users.noreply.github.com> Date: Thu, 29 Feb 2024 00:45:07 -0500 Subject: [PATCH] fix(cli-integ): use `Python_3_12` instead of `Python_3_7` lambda runtime (#29305) Fix for failing CLI integ canary ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../sam_cdk_integ_app/lib/nested-stack.js | 2 +- .../cdk-apps/sam_cdk_integ_app/lib/test-stack.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/nested-stack.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/nested-stack.js index 91828413b270a..8620fb693e4bf 100644 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/nested-stack.js +++ b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/nested-stack.js @@ -10,7 +10,7 @@ class NestedStack1 extends NestedStack { constructor(scope, id, props) { super(scope, id, props); new Function(this, 'FunctionPythonRuntime', { - runtime: Runtime.PYTHON_3_7, + runtime: Runtime.PYTHON_3_12, code: Code.fromAsset('./src/python/Function'), handler: 'app.lambda_handler', }); diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/test-stack.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/test-stack.js index 9df6588f83bd3..3e9a071de8ff1 100644 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/test-stack.js +++ b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/test-stack.js @@ -29,19 +29,19 @@ class CDKSupportDemoRootStack extends Stack{ // Layers new PythonLayerVersion(this, 'PythonLayerVersion', { compatibleRuntimes: [ - Runtime.PYTHON_3_7, + Runtime.PYTHON_3_12, ], entry: './src/python/Layer', }); new LayerVersion(this, 'LayerVersion', { compatibleRuntimes: [ - Runtime.PYTHON_3_7, + Runtime.PYTHON_3_12, ], code: Code.fromAsset('./src/python/Layer'), }); new LayerVersion(this, 'BundledLayerVersionPythonRuntime', { compatibleRuntimes: [ - Runtime.PYTHON_3_7, + Runtime.PYTHON_3_12, ], code: Code.fromAsset('./src/python/Layer', { bundling: { @@ -50,7 +50,7 @@ class CDKSupportDemoRootStack extends Stack{ '-c', 'rm -rf /tmp/asset-input && mkdir /tmp/asset-input && cp * /tmp/asset-input && cd /tmp/asset-input && pip install -r requirements.txt -t . && mkdir /asset-output/python && cp -R /tmp/asset-input/* /asset-output/python', ], - image: Runtime.PYTHON_3_7.bundlingImage, + image: Runtime.PYTHON_3_12.bundlingImage, user: 'root', } }), @@ -61,17 +61,17 @@ class CDKSupportDemoRootStack extends Stack{ entry: './src/python/Function', index: 'app.py', handler: 'lambda_handler', - runtime: Runtime.PYTHON_3_7, + runtime: Runtime.PYTHON_3_12, functionName: 'pythonFunc', logRetention: RetentionDays.THREE_MONTHS, }); new Function(this, 'FunctionPythonRuntime', { - runtime: Runtime.PYTHON_3_7, + runtime: Runtime.PYTHON_3_12, code: Code.fromAsset('./src/python/Function'), handler: 'app.lambda_handler', }); new Function(this, 'BundledFunctionPythonRuntime', { - runtime: Runtime.PYTHON_3_7, + runtime: Runtime.PYTHON_3_12, code: Code.fromAsset('./src/python/Function/', { bundling: { command: [ @@ -79,7 +79,7 @@ class CDKSupportDemoRootStack extends Stack{ '-c', 'rm -rf /tmp/asset-input && mkdir /tmp/asset-input && cp * /tmp/asset-input && cd /tmp/asset-input && pip install -r requirements.txt -t . && cp -R /tmp/asset-input/* /asset-output', ], - image: Runtime.PYTHON_3_7.bundlingImage, + image: Runtime.PYTHON_3_12.bundlingImage, user: 'root', } }),