mirror of
https://github.com/RealOrangeOne/notes.git
synced 2024-11-17 00:19:02 +00:00
Improve wording for bucket transfer note
This commit is contained in:
parent
312b5f0c10
commit
dac716e745
1 changed files with 12 additions and 7 deletions
|
@ -6,8 +6,10 @@ link: https://aws.amazon.com/premiumsupport/knowledge-center/cross-account-acces
|
||||||
emoji: 🪣
|
emoji: 🪣
|
||||||
---
|
---
|
||||||
|
|
||||||
1. Create S3 bucket in account A
|
To copy bucket contents from bucket in account A to bucket in account B:
|
||||||
2. Create IAM role / user 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:
|
3. Add IAM inline policy to user:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
@ -16,14 +18,17 @@ emoji: 🪣
|
||||||
"Statement": [
|
"Statement": [
|
||||||
{
|
{
|
||||||
"Effect": "Allow",
|
"Effect": "Allow",
|
||||||
"Action": "*",
|
"Action": "s3:*",
|
||||||
"Resource": "arn:aws:s3:::<bucket>/*"
|
"Resource": [
|
||||||
|
"arn:aws:s3:::<source_bucket>/*",
|
||||||
|
"arn:aws:s3:::<source_bucket>"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Add policy to bucket
|
4. Add policy to source bucket
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -34,8 +39,8 @@ emoji: 🪣
|
||||||
"Principal": {
|
"Principal": {
|
||||||
"AWS": "arn:aws:iam::<account_id>:user/<user>"
|
"AWS": "arn:aws:iam::<account_id>:user/<user>"
|
||||||
},
|
},
|
||||||
"Action": "*",
|
"Action": "s3:*",
|
||||||
"Resource": ["arn:aws:s3:::<bucket>/*"]
|
"Resource": ["arn:aws:s3:::<source_bucket>/*", "arn:aws:s3:::<source_bucket>"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue