-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the feature
Currently, while using the 'BucketDeployment' CDK construct[1], which copies files from a source S3 bucket to a destination S3 bucket, works perfectly within the same region. However, when customers need to copy files to a cross-region S3 bucket, they encounter the below error, which is expected because there is no opt-in region property for this construct.
"An error occurred (IllegalLocationConstraintException) when calling the ListObjectsV2 operation: The "region-name" location constraint is incompatible for the region specific endpoint this request was sent to."
Use Case
To achieve this use-case either customers need to create a stack in specific region itself or need to use "aws s3 sync" CLI command[2].
[2] https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html
Proposed Solution
Add a new optional property 'region' to the BucketDeployment construct to allow users to specify the destination region for cross-region deployments
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS CDK Library version (aws-cdk-lib)
2.161.0
AWS CDK CLI version
2.1019.1
Environment details (OS name and version, etc.)
OSX