mirror of
https://github.com/RealOrangeOne/notes.git
synced 2024-11-16 19:39:24 +00:00
938 B
938 B
title | tags | link | emoji | |
---|---|---|---|---|
Cross-account data transfer |
|
https://aws.amazon.com/premiumsupport/knowledge-center/cross-account-access-s3/ | 🪣 |
To copy bucket contents from bucket in account A to bucket in account B:
- Create new S3 bucket in account B
- Create IAM role / user in account B, with access to destination bucket
- Add IAM inline policy to user:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::<source_bucket>/*",
"arn:aws:s3:::<source_bucket>"
]
}
]
}
- Add policy to source bucket
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<account_id>:user/<user>"
},
"Action": "s3:*",
"Resource": ["arn:aws:s3:::<source_bucket>/*", "arn:aws:s3:::<source_bucket>"]
}
]
}