Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Dec 27, 2025

Summary

Add support for Mustache-style template variables in the layerName config for AWS Lambda layers. This allows dynamic interpolation of version components at publish time, eliminating manual layer name updates when releasing new major versions.

Template Variables

Variable Description Example (for v10.2.3)
{{{version}}} Full version string 10.2.3
{{{major}}} Major version number 10
{{{minor}}} Minor version number 2
{{{patch}}} Patch version number 3

Example

targets:
  - name: aws-lambda-layer
    layerName: SentryNodeServerlessSDKv{{{major}}}
    # ...

When publishing version 10.2.3, the layer will be named SentryNodeServerlessSDKv10.

Changes

  • Added resolveLayerName() method to AwsLambdaLayerTarget for template interpolation
  • Updated publishRuntimes() to use the resolved layer name
  • Added unit tests for layer name templating
  • Updated documentation with template variable reference and examples

Closes #646.

Add support for Mustache-style template variables in the layerName config
for AWS Lambda layers. This allows dynamic interpolation of version
components (major, minor, patch, version) at publish time.

Example: `SentryNodeServerlessSDKv{{{major}}}` becomes
`SentryNodeServerlessSDKv10` when publishing version 10.2.3.

This eliminates the need for manual layer name updates when releasing
new major versions.

Closes #646.
@github-actions
Copy link
Contributor

Suggested Version Bump

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Changelog

  • Add support for custom changelog entries from PR descriptions by @szokeasaurusrex in #648

  • And with support for multiple entries by @szokeasaurusrex in #648

    • and nested items
  • feat(changelog): Add changelog preview action and CLI command by @BYK in #669

  • feat(actions): Make release workflow reusable for external repos by @BYK in #672

  • feat(aws-lambda): Add version templating for layer names by @BYK in #678

Documentation 📚

  • docs: New documentation site! by @BYK in #668

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 27, 2025

PR Preview Action v1.7.2
Preview removed because the pull request was closed.
2025-12-28 18:39 UTC

@BYK BYK requested a review from andreiborza December 27, 2025 22:04
@BYK BYK marked this pull request as ready for review December 27, 2025 22:04
@BYK BYK enabled auto-merge (squash) December 27, 2025 22:04
@BYK BYK merged commit 9692d34 into master Dec 28, 2025
15 checks passed
@BYK BYK deleted the byk/feat/aws-layer-name-pattern branch December 28, 2025 18:38
andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request Jan 2, 2026
Craft now supports mustach-style template variables for versions which means we
no longer have to worry about manually keeping track of the major in the layer
name.

Related: getsentry/craft#678

Closes: #18674
andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request Jan 2, 2026
Craft now supports mustach-style template variables for versions which means we
no longer have to worry about manually keeping track of the major in the layer
name.

Related: getsentry/craft#678

Closes: #18674
andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request Jan 2, 2026
Craft now supports mustach-style template variables for versions which means we
no longer have to worry about manually keeping track of the major in the layer
name.

Related: getsentry/craft#678

Closes: #18674
andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request Jan 2, 2026
Craft now supports mustach-style template variables for versions which means we
no longer have to worry about manually keeping track of the major in the layer
name.

Related: getsentry/craft#678

Closes: #18674
andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request Jan 2, 2026
Craft now supports mustach-style template variables for versions which
means we no longer have to worry about manually keeping track of the
major in the layer name.

Related: getsentry/craft#678

Closes: #18674
andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request Jan 2, 2026
Craft now supports mustach-style template variables for versions which
means we no longer have to worry about manually keeping track of the
major in the layer name.

Related: getsentry/craft#678

Closes: #18674
andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request Jan 2, 2026
Craft now supports mustach-style template variables for versions which
means we no longer have to worry about manually keeping track of the
major in the layer name.

Related: getsentry/craft#678

Closes: #18674
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve AWS Lambda layer naming

3 participants