Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 59 discussion

A solutions architect needs to copy data from an Amazon S3 bucket m an AWS account to a new S3 bucket in a new AWS account. The solutions architect must implement a solution that uses the AWS CLI.

Which combination of steps will successfully copy the data? (Choose three.)

  • A. Create a bucket policy to allow the source bucket to list its contents and to put objects and set object ACLs in the destination bucket. Attach the bucket policy to the destination bucket.
  • B. Create a bucket policy to allow a user in the destination account to list the source bucket’s contents and read the source bucket’s objects. Attach the bucket policy to the source bucket.
  • C. Create an IAM policy in the source account. Configure the policy to allow a user in the source account to list contents and get objects in the source bucket, and to list contents, put objects, and set object ACLs in the destination bucket. Attach the policy to the user.
  • D. Create an IAM policy in the destination account. Configure the policy to allow a user in the destination account to list contents and get objects in the source bucket, and to list contents, put objects, and set objectACLs in the destination bucket. Attach the policy to the user.
  • E. Run the aws s3 sync command as a user in the source account. Specify the source and destination buckets to copy the data.
  • F. Run the aws s3 sync command as a user in the destination account. Specify the source and destination buckets to copy the data.
Show Suggested Answer Hide Answer
Suggested Answer: BDF 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
icassp
Highly Voted 1 year, 10 months ago
Selected Answer: BDF
"The above command should be executed with destination AWS IAM user account credentials only otherwise the copied objects in destination S3 bucket will still have the source account permissions and won’t be accessible by destination account users." According to https://medium.com/tensult/copy-s3-bucket-objects-across-aws-accounts-e46c15c4b9e1.
upvoted 26 times
masetromain
1 year, 10 months ago
You are correct, step E should be executed using the IAM user credentials from the destination account. This is because when objects are copied from one bucket to another, the object's permissions (ACLs) are also copied. Therefore, if the objects are copied using the IAM user credentials from the source account, the objects will have the same permissions as they did in the source bucket, which may not include permissions for the user in the destination account. By using the IAM user credentials from the destination account, the objects will have the appropriate permissions for the user in the destination account once they are copied.
upvoted 5 times
...
...
masetromain
Highly Voted 1 year, 10 months ago
Selected Answer: BDF
I switch to BDF; Step B is necessary so that the user in the destination account has the necessary permissions to access the source bucket and list its contents, read its objects. Step D is needed so that the user in the destination account has the necessary permissions to access the destination bucket and list contents, put objects, and set object ACLs Step F is necessary because the aws s3 sync command needs to be run using the IAM user credentials from the destination account, so that the objects will have the appropriate permissions for the user in the destination account once they are copied. The other choices are not correct because : A. and C. are about creating policies in the source account but the user who wants to access the data is in the destination account E. is about running the command with the source account, which is not suitable because it will lead to copied objects in destination S3 bucket still have the source account permissions and won’t be accessible by destination account users.
upvoted 16 times
...
jAtlas7
Most Recent 3 days, 22 hours ago
BDF is the answer - see: https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/copy-data-from-an-s3-bucket-to-another-account-and-region-by-using-the-aws-cli.html
upvoted 1 times
...
amministrazione
2 months, 3 weeks ago
B. Create a bucket policy to allow a user in the destination account to list the source bucket’s contents and read the source bucket’s objects. Attach the bucket policy to the source bucket. D. Create an IAM policy in the destination account. Configure the policy to allow a user in the destination account to list contents and get objects in the source bucket, and to list contents, put objects, and set objectACLs in the destination bucket. Attach the policy to the user. F. Run the aws s3 sync command as a user in the destination account. Specify the source and destination buckets to copy the data.
upvoted 1 times
...
8608f25
9 months, 2 weeks ago
Selected Answer: BDF
B. Create a bucket policy to allow a user in the destination account to list the source bucket’s contents and read the source bucket’s objects. Attach the bucket policy to the source bucket. This step ensures that the destination account has the necessary permissions to access the data in the source bucket. D. Create an IAM policy in the destination account. Configure the policy to allow a user in the destination account to list contents and get objects in the source bucket, and to list contents, put objects, and set object ACLs in the destination bucket. Attach the policy to the user. This step provides the necessary permissions for a user in the destination account to both access the source bucket’s contents and write to the destination bucket.
upvoted 1 times
8608f25
9 months, 2 weeks ago
F. Run the aws s3 sync command as a user in the destination account. Specify the source and destination buckets to copy the data. Performing the sync operation as a user in the destination account, who has been granted the appropriate permissions, ensures that the data can be copied from the source bucket to the destination bucket successfully.
upvoted 1 times
...
...
ninomfr64
10 months, 3 weeks ago
Selected Answer: BDF
Not A. A bucket policy attached to destination bucket cannot allow the source bucket to execute actions Not C. Because we are picking option B which relies on a policy allowing a user in the destination account. Not E. Because we are picking options B and D which rely on a user in the destination account
upvoted 1 times
...
jpa8300
10 months, 3 weeks ago
Selected Answer: BDF
No need for more explanations, the ones below are enough.
upvoted 1 times
...
edder
12 months ago
Selected Answer: BDF
BD: https://repost.aws/knowledge-center/cross-account-access-s3 F: https://docs.aws.amazon.com/cli/latest/userguide/cli-services-s3-commands.html
upvoted 1 times
...
aviathor
1 year, 2 months ago
Selected Answer: BDF
A is incorrect since a bucket policy cannot allow another bucket to do anything. B. Is however an option since you can indeed create a bucket policy to allow a user in another account to perform operations on the bucket. Once you have chosen B, then D and F are the only possible choices.
upvoted 2 times
...
H4des
1 year, 3 months ago
Selected Answer: BCE
BCE should also work Create bucket policy at destination bucket to allow permission on source aws user Create IAM policy for source aws user to list/get/put on both buckets Run s3 sync command from source bucket to destination bucket
upvoted 1 times
...
CuteRunRun
1 year, 3 months ago
Selected Answer: BDF
I prefer BDF, I do not know why the correct answer is ADF
upvoted 1 times
...
Christina666
1 year, 4 months ago
Selected Answer: BDF
source bucket: allow destination user + list & get contents permission destination bucket: allow IAM user to get source bucket contents + destination bucket get/list/put objects + aws sync command
upvoted 2 times
...
NikkyDicky
1 year, 4 months ago
Selected Answer: BDF
it's BDF for sure
upvoted 1 times
...
Maria2023
1 year, 5 months ago
Selected Answer: BDF
The entire idea of A is wrong (you achieve nothing by giving rights from one bucket to another) so we start from B and the rest are a common sense
upvoted 2 times
...
huanaws088
1 year, 7 months ago
Selected Answer: BDF
https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/copy-data-from-an-s3-bucket-to-another-account-and-region-by-using-the-aws-cli.html
upvoted 3 times
...
God_Is_Love
1 year, 8 months ago
Logical answer : Who ever uploads to a bucket becomes its owner. So A should ring a flaw in it. Similar issue in C. So straight away, A, C are wrong. that points to B,D to be correct. Refer https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/copy-data-from-an-s3-bucket-in-one-account-and-region-to-another-account-and-region.html Now E or F ? the hint is in D. Destination account user has the necessary privileges to get/put objects permission. So choose destination account or run sync/copy commands. So the answer should be B, D , F
upvoted 6 times
...
hobokabobo
1 year, 9 months ago
The parts BDF fit together in a way that works. I think choosing this direction (pulling from the destination account) is slightly more secure than then the other other way round(pushing from source to destination) as only read access is granted to the foreign account but no write access - especially regarding human error: one cannot accidentally tamper with the source, so the worst thing that could happen is that one needs to sync again. The other options don't fit together with other parts.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...