Closed mingzhu-abb closed 5 years ago
mingzhu-abb@, Please submit the PR with the fix.
mingzhu-abb@ The solution does not support Cross-Account i.e. source and destination buckets should be in same AWS account, as noted in the documentation "Once deployed, the CRR Monitor applies the appropriate configuration for monitoring the replicated Amazon S3 buckets across all AWS Regions in a single account."
https://docs.aws.amazon.com/solutions/latest/crr-monitor/considerations.html
We have a pending feature request to update the solution to support Cross-Account scenarios.
Please check PR #5 . Would you mind merging this PR , even though you don't support x-account yet? I think my PR is harmless after all.
The pull request was accepted and will be part of the next release. @mingzhu-abb It would be great if we can close this ticket and track it via the pull request ticket. Thanks.
Closing this issue as the latest update contains this PR.
I encountered an error deploying this stack. Here's our setup:
Source bucket
bucket1
is in ourProd
AWS account, with home regionus-east-1
.Dest bucket
bucket1-dest
is in ourDisaster Recovery
aws account, with home regionus-west-2
.We have setup cross region & cross account replication from
bucket1
tobucket1-dest
.When I create the stack, it fails in
Custom::DeployAgent
with following error log:After debugging, it turns out to be caused by some fault in
GetBucketLocation
:The stack is setup in
us-east-1
, so the following Lambda code creates an S3 client withus-east-1
as default region:When it tries to call
GetBucketLocation
on the dest bucket, which is created inus-west-2
, S3 returns the above error.I googled this issue, and found an work around solution by using
HeadBucket
to get bucket location, which worked well. Please also fix this issue here, so that other people could benefit.Thanks,