7777 strategy :
7878 matrix :
7979 layer :
80+ # Python 3.9 remains here to verify its final layer version.
8081 - AWSLambdaPowertoolsPythonV3-python39
8182 - AWSLambdaPowertoolsPythonV3-python310
8283 - AWSLambdaPowertoolsPythonV3-python311
9495 aws-region : us-east-1
9596 mask-aws-account-id : true
9697 - name : Output ${{ matrix.layer }}-${{ matrix.arch }}
98+ env :
99+ VERSION : ${{ matrix.layer == 'AWSLambdaPowertoolsPythonV3-python39' && '27' || inputs.version }}
97100 # fetch the specific layer version information from the us-east-1 commercial region
98101 run : |
99- aws --region us-east-1 lambda get-layer-version-by-arn --arn ' arn:aws:lambda:us-east-1:017000801446:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ inputs.version }}' > '${{ matrix.layer }}-${{ matrix.arch }}.json'
102+ aws --region us-east-1 lambda get-layer-version-by-arn --arn " arn:aws:lambda:us-east-1:017000801446:layer:${{ matrix.layer }}-${{ matrix.arch }}:${VERSION}" > '${{ matrix.layer }}-${{ matrix.arch }}.json'
100103 - name : Store Metadata
101104 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
102105 with :
@@ -120,6 +123,7 @@ jobs:
120123 matrix :
121124 region : ${{ fromJson(needs.setup.outputs.regions) }}
122125 layer :
126+ # Python 3.9 remains here to verify its final layer version.
123127 - AWSLambdaPowertoolsPythonV3-python39
124128 - AWSLambdaPowertoolsPythonV3-python310
125129 - AWSLambdaPowertoolsPythonV3-python311
@@ -146,8 +150,10 @@ jobs:
146150 audience : ${{ needs.setup.outputs.aud }}
147151 - id : partition_version
148152 name : Partition Layer Version
153+ env :
154+ VERSION : ${{ matrix.layer == 'AWSLambdaPowertoolsPythonV3-python39' && '27' || inputs.partition_version || inputs.version }}
149155 run : |
150- echo ' partition_version=$([[ -n "${{ inputs.partition_version}}" ]] && echo ${{ inputs.partition_version}} || echo ${{ inputs.version }} )' >> "$GITHUB_OUTPUT"
156+ echo " partition_version=$VERSION" >> "$GITHUB_OUTPUT"
151157 - name : Verify Layer
152158 run : |
153159 export layer_output='${{ matrix.layer }}-${{ matrix.arch }}-${{matrix.region}}.json'
0 commit comments