Skip to content

Maintenance: Verify Output of Layer Deployment (Partitions) GitHub Action #4182

@svozza

Description

@svozza

Summary

Currently we are manually verifying the output of the GitHub action that deploys the Lambda layers to GovCloud and China regions. The validation steps are as follows:

Verify GovCloud Layers (Gamma): Download the AWSLambdaPowertoolsTypeScriptV2-us-gov-east-1.json and AWSLambdaPowertoolsTypeScriptV2-us-gov-west-1.json ZIP files. Unzip the files, inspect the JSON files therein and ensure the version number in the Description field (i.e., Powertools for AWS Lambda (TypeScript) version 2.20.0) and the layer version in the LayerVersionArn field (i.e., arn:aws-us-gov:lambda:us-gov-east-1:164754790254:layer:AWSLambdaPowertoolsTypeScriptV2:31) are correct.

Verify China Layer (Gamma): Download the AWSLambdaPowertoolsTypeScriptV2-cn-north-1.json ZIP file. Unzip
the file, inspect the JSON file therein and ensure the version number in the Description field
(i.e., Powertools for AWS Lambda (TypeScript) version 2.20.0) and the layer version in the LayerVersionArn field
(i.e., arn:aws-cn:lambda:cn-north-1:498595349401:layer:AWSLambdaPowertoolsTypeScriptV2:31) are correct.

We could automate this validation as part of the GitHub action and fail the action if the validation fails.

Why is this needed?

This will remove four manual steps from our release process and reduce the number of GitHub actions we have.

Which area does this relate to?

Automation

Solution

Currently we are already verifying the checksum of the layer:

test "$REMOTE_SHA" == "$LOCAL_SHA" && echo "SHA OK: ${LOCAL_SHA}" || exit 1

We can add two further checks to check the Description and LayerVersionArn fields.

In addtion we can also deprecate the Layer Verification (Partition) action:

https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/.github/workflows/layers_partition_verify.yml

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedThe scope is clear, ready for implementationinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions