Skip to content

Commit c693d44

Browse files
Teste beta layer
1 parent 229bcd6 commit c693d44

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/publish_v3_layer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
run: sleep 60
146146

147147
- name: CDK build
148-
run: npx cdk synth --verbose --context version="${{ inputs.latest_published_version }}" --context pythonVersion="${{ matrix.python-version }}" -o cdk.out
148+
run: npx cdk synth --verbose --context version="${{ inputs.latest_published_version }}" --context pythonVersion="python${{ matrix.python-version }}" -o cdk.out
149149
- name: zip output
150150
run: zip -r cdk.py${{ matrix.python-version }}.out.zip cdk.out
151151
- name: Archive CDK artifacts

layer_v3/layer/layer_stack.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RemovalPolicy,
1313
Stack,
1414
)
15-
from aws_cdk.aws_lambda import Architecture, CfnLayerVersionPermission
15+
from aws_cdk.aws_lambda import Architecture, CfnLayerVersionPermission, Runtime
1616
from aws_cdk.aws_ssm import StringParameter
1717
from cdk_aws_lambda_powertools_layer import LambdaPowertoolsLayerPythonV3
1818
from constructs import Construct
@@ -83,6 +83,17 @@ def __init__(
8383
layer_name_x86 = f"AWSLambdaPowertoolsPythonV3-{python_version_normalized}-x86"
8484
layer_name_arm64 = f"AWSLambdaPowertoolsPythonV3-{python_version_normalized}-arm64"
8585

86+
if python_version == "python3.8":
87+
python_version = Runtime.PYTHON_3_8
88+
if python_version == "python3.9":
89+
python_version = Runtime.PYTHON_3_9
90+
if python_version == "python3.10":
91+
python_version = Runtime.PYTHON_3_10
92+
if python_version == "python3.11":
93+
python_version = Runtime.PYTHON_3_11
94+
if python_version == "python3.12":
95+
python_version = Runtime.PYTHON_3_12
96+
8697
has_arm64_support = CfnParameter(
8798
self,
8899
"HasARM64Support",

0 commit comments

Comments
 (0)