Skip to content

Commit 7102df9

Browse files
committed
ci: drop the version-named SSM layer parameter
Every merge to main has failed at deploy-beta since the v1.1.0 revert (2026-07-10) with: Resource of type 'AWS::SSM::Parameter' with identifier '/lambda-web-adapter/layer/x86_64/1.0.1' already exists. (AlreadyExists) The parameter's Name embedded ${CargoPkgVersion}, so a version change forces CloudFormation to replace the resource, and UpdateReplacePolicy: Retain left the old name behind un-managed. Releasing 1.1.0 orphaned /x86_64/1.0.1; reverting to 1.0.1 then tried to create that exact name and hit the orphan. Rollback restores the 1.1.0 name, so the next deploy repeats it — a permanent wedge, not a flake. It also took e2e-test-zip and e2e-test-oci down with it (both `needs: deploy-beta`), so main had no e2e coverage for two months. Removing the resource is the fix rather than dropping UpdateReplacePolicy: with only the current version ever tracked, the per-version parameter holds the same value as the /latest parameter beside it, so it earns nothing. The alternative — writing it with `aws ssm put-parameter --overwrite` from the workflow — needs ssm:PutParameter added to the PipelineExecutionRole in every beta, gamma, prod, and China account, which today grants only ssm:GetParameters on /lambda-web-adapter/e2e/*. Nothing reads a per-version parameter: the only consumer of either parameter is tests/e2e_tests/fixtures/go-httpbin-zip/template.yaml, which reads /lambda-web-adapter/layer/x86_64/latest. That one keeps its static name, so it updates in place and can never collide. No parameter is deleted by this change. DeletionPolicy: Retain applies when a resource is removed from the template, so the currently-tracked names are kept as the historical pointers, and the layer Description still records the version for `aws lambda list-layer-versions`.
1 parent 4c38d8f commit 7102df9

2 files changed

Lines changed: 12 additions & 18 deletions

File tree

‎template-arm64.yaml‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,10 @@ Resources:
3939
Type: String
4040
Value: !Ref LambdaAdapterLayerArm64
4141

42-
LambdaAdapterLayerArm64VersionParameter:
43-
Type: AWS::SSM::Parameter
44-
DeletionPolicy: Retain
45-
UpdateReplacePolicy: Retain
46-
Properties:
47-
Name: !Sub '/lambda-web-adapter/layer/arm64/${CargoPkgVersion}'
48-
Description: !Sub 'Layer ARN for the latest Lambda Web Adapter Arm64 Layer: ${CargoPkgVersion}'
49-
Type: String
50-
Value: !Ref LambdaAdapterLayerArm64
42+
# A per-version parameter (/lambda-web-adapter/layer/arm64/<CargoPkgVersion>) used to
43+
# live here. See the matching comment in template-x86_64.yaml for why it was removed:
44+
# a Name change replaces the parameter, and UpdateReplacePolicy: Retain orphaned the
45+
# old name, so re-deploying an already-used version failed with AlreadyExists.
5146

5247
Outputs:
5348
LambdaAdapterLayerArm64Arn:

‎template-x86_64.yaml‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,14 @@ Resources:
3939
Type: String
4040
Value: !Ref LambdaAdapterLayerX86
4141

42-
LambdaAdapterLayerArm64VersionParameter:
43-
Type: AWS::SSM::Parameter
44-
DeletionPolicy: Retain
45-
UpdateReplacePolicy: Retain
46-
Properties:
47-
Name: !Sub '/lambda-web-adapter/layer/x86_64/${CargoPkgVersion}'
48-
Description: !Sub 'Layer ARN for the latest Lambda Web Adapter X86_64 Layer: ${CargoPkgVersion}'
49-
Type: String
50-
Value: !Ref LambdaAdapterLayerX86
42+
# A per-version parameter (/lambda-web-adapter/layer/x86_64/<CargoPkgVersion>) used
43+
# to live here. It was removed: because CloudFormation replaces a parameter when its
44+
# Name changes, and UpdateReplacePolicy was Retain, every version bump orphaned the
45+
# previous name. Deploying a version whose name had already been orphaned — after the
46+
# v1.1.0 revert, or on any re-release — then failed with AlreadyExists and wedged
47+
# every merge to main. Existing per-version parameters are retained, and the layer's
48+
# Description still records the version, so `aws lambda list-layer-versions` maps a
49+
# version to its layer ARN.
5150

5251
Outputs:
5352
LambdaAdapterLayerX86Arn:

0 commit comments

Comments
 (0)