1
Fork 0
mirror of https://github.com/RealOrangeOne/notes.git synced 2024-11-16 21:59:03 +00:00

Improve wording for bucket transfer note

This commit is contained in:
Jake Howard 2022-09-20 17:23:59 +01:00
parent 312b5f0c10
commit dac716e745
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -6,8 +6,10 @@ link: https://aws.amazon.com/premiumsupport/knowledge-center/cross-account-acces
emoji: 🪣
---
1. Create S3 bucket in account A
2. Create IAM role / user in account B
To copy bucket contents from bucket in account A to bucket in account B:
1. Create new S3 bucket in account B
2. Create IAM role / user in account B, with access to destination bucket
3. Add IAM inline policy to user:
```json
@ -16,14 +18,17 @@ emoji: 🪣
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "arn:aws:s3:::<bucket>/*"
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::<source_bucket>/*",
"arn:aws:s3:::<source_bucket>"
]
}
]
}
```
4. Add policy to bucket
4. Add policy to source bucket
```json
{
@ -34,8 +39,8 @@ emoji: 🪣
"Principal": {
"AWS": "arn:aws:iam::<account_id>:user/<user>"
},
"Action": "*",
"Resource": ["arn:aws:s3:::<bucket>/*"]
"Action": "s3:*",
"Resource": ["arn:aws:s3:::<source_bucket>/*", "arn:aws:s3:::<source_bucket>"]
}
]
}