feat(s3-deployment): add destinationBucketRegion prop for cross-region deployments - #38200
feat(s3-deployment): add destinationBucketRegion prop for cross-region deployments#38200bentorb wants to merge 2 commits into
Conversation
4688b0d to
f118520
Compare
f118520 to
118d733
Compare
118d733 to
06837ff
Compare
06837ff to
ef4b492
Compare
ef4b492 to
1e6387a
Compare
1e6387a to
7b5101b
Compare
7b5101b to
7fb92e8
Compare
7fb92e8 to
6e39d8c
Compare
5031295 to
9b729f4
Compare
9b729f4 to
59f06b2
Compare
59f06b2 to
acad3eb
Compare
acad3eb to
a2c284c
Compare
…n deployments Adds a `destinationBucketRegion` prop to `BucketDeployment` that passes `--region` to the underlying AWS CLI commands (s3 sync, s3 cp, s3 rm) in the Lambda handler. This enables deployments to buckets in regions other than the Lambda's execution region, including opt-in regions such as eu-south-2.
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
9 similar comments
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
Issue
Closes #34858.
Reason for this change
When deploying to an S3 bucket in a different region than the Lambda's execution region — particularly opt-in regions like
eu-south-2orap-east-1— the AWS CLI commands (s3 sync,s3 cp,s3 rm) default to the Lambda's region and fail withIllegalLocationConstraintException.Description of changes
Adds a
destinationBucketRegionoptional prop toBucketDeployment. When specified, the value is passed as--regionto all AWS CLI commands in the Lambda handler (s3 sync,s3 cp,s3 rm). This allows the handler to operate on buckets in any region regardless of where the Lambda itself is running.Describe any new or updated permissions being added
No new IAM permissions required.
Description of how you validated changes
destinationBucketRegionspecified and not specified (bucket-deployment.test.ts)DestinationBucketRegion(test.py, run via Docker)integ.bucket-deployment-cross-region.ts) covering 10 scenarios across standard and opt-in regions (us-east-1,us-west-2,eu-south-2)eu-south-2opted inaws-s3-deploymentintegration snapshots verified UNCHANGEDChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license