Skip to content

feat(s3-deployment): add architecture property to BucketDeployment#37174

Open
badmintoncryer wants to merge 10 commits intoaws:mainfrom
badmintoncryer:fix/issue-29996-s3-deployment-architecture
Open

feat(s3-deployment): add architecture property to BucketDeployment#37174
badmintoncryer wants to merge 10 commits intoaws:mainfrom
badmintoncryer:fix/issue-29996-s3-deployment-architecture

Conversation

@badmintoncryer
Copy link
Copy Markdown
Contributor

Issue # (if applicable)

Closes #29996.

Reason for this change

BucketDeployment does not expose an architecture property, so users cannot use ARM_64 (Graviton) Lambda.

Description of changes

  • Add optional architecture prop to BucketDeploymentProps and pass through to singleton handler
  • Include architecture in singleton UUID to isolate different configs
  • Add compatibleArchitectures: [X86_64, ARM_64] to AwsCliLayer
  • Update README with usage example

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Added both unit and integration tests.

Note on snapshot changes

Adding compatibleArchitectures to AwsCliLayer causes CompatibleArchitectures property to appear in every AWS::Lambda::LayerVersion resource generated by AwsCliLayer. Since AwsCliLayer is used across many modules (s3-deployment, eks, eks-v2, stepfunctions-tasks, codepipeline-actions, dynamodb, elasticloadbalancingv2, etc.), this results in 203 snapshot file updates (103 template.json + 100 tree.json).

The actual change per resource is minimal — only adding the metadata property:

"CompatibleArchitectures": ["x86_64", "arm64"]

This does not cause resource replacement or any runtime behavior change. CompatibleArchitectures is an informational property that CloudFormation uses only for validation.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 labels Mar 5, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team March 5, 2026 13:13
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Mar 5, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ❌️SkippedFailed
Security Guardian Results
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ☑️SkippedFailed ❌️
Security Guardian Results with resolved templates2520 ran2514 passed6 failed
TestResult
Security Guardian Results with resolved templates
packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-commands.js.snapshot/aws-cdk-codepipeline-commands.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ec2-deploy-ssm-managed.js.snapshot/aws-cdk-codepipeline-ec2-deploy-ssm-managed-node.template.json
ec2-no-open-security-groups.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ec2-deploy.js.snapshot/aws-cdk-codepipeline-ec2-deploy.template.json
ec2-no-open-security-groups.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-image-scan-action.js.snapshot/codepipeline-ecr-image-scan-action.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-eks-v2/test/integ.eks-cluster-imported.js.snapshot/aws-cdk-eks-import-cluster-test.template.json
iam-role-root-principal-needs-conditions.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb-mtls.js.snapshot/alb-mtls-test-stack.template.json
ec2-no-open-security-groups.guard❌ failure

@badmintoncryer badmintoncryer force-pushed the fix/issue-29996-s3-deployment-architecture branch from d1b7170 to ae66043 Compare March 5, 2026 13:21
@badmintoncryer badmintoncryer force-pushed the fix/issue-29996-s3-deployment-architecture branch from ae66043 to 1afe1b0 Compare March 5, 2026 13:31
@badmintoncryer badmintoncryer force-pushed the fix/issue-29996-s3-deployment-architecture branch from 1afe1b0 to 137e8ca Compare March 5, 2026 13:39
@badmintoncryer badmintoncryer force-pushed the fix/issue-29996-s3-deployment-architecture branch from 137e8ca to bc269b1 Compare March 5, 2026 14:29
@badmintoncryer badmintoncryer force-pushed the fix/issue-29996-s3-deployment-architecture branch from bc269b1 to 0fbca07 Compare March 5, 2026 14:30
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 5, 2026 14:57

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Add an `architecture` property to `BucketDeploymentProps` so users can
configure the Lambda function architecture (e.g. ARM_64/Graviton) for
cost savings and sustainability improvements.

- Pass architecture through to BucketDeploymentSingletonFunction
- Include architecture in singleton UUID to isolate different configs
- Declare compatibleArchitectures on AwsCliLayer for both x86_64/arm64
- Add unit tests for architecture passthrough, singleton isolation,
  default behavior, and combined memoryLimit scenarios
- Update README with Lambda Architecture section

Closes aws#29996

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
badmintoncryer and others added 3 commits March 6, 2026 00:10
…chitectures

Update 103 template.json and 100 tree.json snapshot files to include
the CompatibleArchitectures property added to AwsCliLayer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… zip asset

The Rosetta build failed because the architecture code example was missing
`import * as lambda from 'aws-cdk-lib/aws-lambda'`. Also re-tracked the
integration test zip asset through Git LFS to fix check-lfs CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@badmintoncryer badmintoncryer force-pushed the fix/issue-29996-s3-deployment-architecture branch from c33d4d0 to 5df0e4b Compare March 7, 2026 13:57
@badmintoncryer badmintoncryer marked this pull request as ready for review March 7, 2026 15:13
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-s3-deployment): Switch Lambda architecture to ARM_64

2 participants