Skip to content

Conversation

@oyiz-michael
Copy link
Contributor

@oyiz-michael oyiz-michael commented Nov 28, 2025

Issue number: closes #7650

Summary

This extends the fix from #6868 to handle all AWS partitions, not just commercial AWS. The previous fix only updated layer ARNs with specific python versions (e.g., python312) but missed the template placeholders with {python_version} for China and GovCloud partitions.

Changes

  • Updated docs/index.md: Changed hardcoded layer versions from :18 to :27 for all AWS partitions (8 ARN updates total)

    • Commercial AWS (x86_64 + ARM)
    • AWS China Beijing (x86_64 + ARM)
    • AWS GovCloud us-gov-east-1 (x86_64 + ARM)
    • AWS GovCloud us-gov-west-1 (x86_64 + ARM)
  • Enhanced layer_v3/scripts/update_layer_arn_v3.sh: Added automation to update China and GovCloud layer ARNs

    • Added sed patterns for arn:aws-cn:lambda (AWS China)
    • Added sed patterns for arn:aws-us-gov:lambda (GovCloud)
    • Each partition handles both specific versions (e.g., python312) and template placeholders ({python_version})
    • Updated grep command to catch all AWS partitions

User experience

Before:

  • Users in AWS China and GovCloud regions saw outdated layer version :18 in documentation
  • CI/CD automation only updated commercial AWS layer ARNs, leaving China and GovCloud stale
  • Users had to manually look up correct layer versions using AWS CLI or console

After:

  • All AWS partitions now show current layer version :27
  • Future CI/CD deployments will automatically update layer versions across all AWS partitions
  • Users get accurate, up-to-date layer ARNs regardless of which AWS partition they're using

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Fixes aws-powertools#7650

This extends the fix from aws-powertools#6868 to handle all AWS partitions, not just
commercial AWS. The previous fix only updated layer ARNs with specific
python versions (e.g., python312) but missed the template placeholders
with {python_version} for China and GovCloud partitions.

Changes:
- Updated hardcoded layer versions from :18 to :27 in docs/index.md
- Extended update_layer_arn_v3.sh to handle AWS China (arn:aws-cn)
  and GovCloud (arn:aws-us-gov) layer ARNs
- Added sed patterns for both specific versions and {python_version}
  placeholders across all AWS partitions

The automation now correctly updates layer versions for:
- Commercial AWS: arn:aws:lambda:{region}:017000801446:layer:...
- AWS China: arn:aws-cn:lambda:cn-north-1:498634801083:layer:...
- GovCloud East: arn:aws-us-gov:lambda:us-gov-east-1:165087284144:layer:...
- GovCloud West: arn:aws-us-gov:lambda:us-gov-west-1:165093116878:layer:...
@oyiz-michael oyiz-michael requested a review from a team as a code owner November 28, 2025 20:41
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Nov 28, 2025
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 28, 2025
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @oyiz-michael! APPROVED!

@sonarqubecloud
Copy link

@leandrodamascena leandrodamascena changed the title fix(ci): update layer version for all AWS partitions in docs chore(ci): update layer version for all AWS partitions in docs Dec 16, 2025
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Dec 16, 2025
@leandrodamascena leandrodamascena merged commit 861ea1f into aws-powertools:develop Dec 16, 2025
10 checks passed
@github-actions github-actions bot added the internal Maintenance changes label Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Maintenance changes size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Layer Version is Wrong in Docs

2 participants