Skip to content

Commit 9dc40e5

Browse files
committed
add description block
1 parent f825f8a commit 9dc40e5

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/update_ssm.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# SSM Parameters update
2+
#
3+
# PROCESS
4+
# Creates parameters in regional AWS accounts for each layer we create, using the inputs to target specific releases
5+
# * environment: will prefix /beta/ into the parameter
6+
# * write_latest: will create a latest alias instead of a version number in the parameter
7+
# * package_version: semantic version number of the released layer (3.x.y)
8+
# * layer_version: this is sequential layer version from the ARN
9+
#
10+
# A successful parameter would look similar to:
11+
# /aws/service/powertools/python/arm64/python3.8/3.1.0
12+
# And will have a value of:
13+
# arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-arm64:4
14+
115
on:
216
workflow_dispatch:
317
inputs:
@@ -25,7 +39,7 @@ on:
2539
required: true
2640

2741
name: SSM Parameters
28-
run-name: SSM Parameters - ${{ inputs.language }}
42+
run-name: SSM Parameters - Python
2943

3044
permissions:
3145
contents: read
@@ -43,17 +57,17 @@ jobs:
4357
"il-central-1", "me-central-1", "me-south-1", "sa-east-1", "us-east-1",
4458
"us-east-2", "us-west-1", "us-west-2", "ap-southeast-5"
4559
]
46-
60+
4761
permissions:
4862
contents: write
4963
id-token: write
5064
steps:
5165
- id: transform
5266
run: |
53-
echo 'CONVERTED_REGION=${{ matrix.region }}' | tr [a-z\-] [A-Z_] >> "$GITHUB_OUTPUT"
67+
echo 'CONVERTED_REGION=${{ matrix.region }}' | tr 'a-z\-' 'A-Z_' >> "$GITHUB_OUTPUT"
5468
- id: creds
5569
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
56-
with:
70+
with:
5771
aws-region: ${{ matrix.region }}
5872
role-to-assume: ${{ secrets[format('{0}', steps.transform.outputs.CONVERTED_REGION)] }}
5973
mask-aws-account-id: true
@@ -76,9 +90,9 @@ jobs:
7690
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.13/${{ inputs.package_version }} --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-x86_64:${{ inputs.layer_version }}" --type String
7791
7892
- id: write-latest
79-
if: inputs.write_latest == true
93+
if: inputs.write_latest == true
8094
env:
81-
prefix: ${{ inputs.environment == 'beta' && '/aws/service/powertools/beta' || '/aws-service/powertools' }}
95+
prefix: ${{ inputs.environment == 'beta' && '/aws/service/powertools/beta' || '/aws-service/powertools' }}
8296
run: |
8397
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.8/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-arm64:${{ inputs.layer_version }}" --type String
8498
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.9/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-arm64:${{ inputs.layer_version }}" --type String

0 commit comments

Comments
 (0)