Skip to content

Commit

Permalink
fix(cli-integ): use Python_3_12 instead of Python_3_7 lambda runt…
Browse files Browse the repository at this point in the history
…ime (#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*
  • Loading branch information
sumupitchayan committed Feb 29, 2024
1 parent d308818 commit 8d07b85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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',
}
}),
Expand All @@ -61,25 +61,25 @@ 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: [
'/bin/sh',
'-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',
}
}),
Expand Down

0 comments on commit 8d07b85

Please sign in to comment.