exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 84 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 84
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer is deploying on application on Amazon EC2 instances that run in Account A. In certain cases, this application needs to read data from a private
Amazon S3 bucket in Account B. The developer must provide the application access to the S3 bucket without exposing the S3 bucket to anyone else.
Which combination of actions should the developer take to meet these requirements? (Choose two.)

  • A. Create an IAM role with S3 read permissions in Account B.
  • B. Update the instance profile IAM role in Account A with S3 read permissions.
  • C. Make the S3 bucket public with limited access for Account A.
  • D. Configure the bucket policy in Account B to grant permissions to the instance profile role.
  • E. Add a trust policy that allows s3:Get* permissions to the IAM rote in Account B.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
JOL86
Highly Voted 2 years, 5 months ago
I think it might be B and D. For cross account access, you need to set resource policy on the S3 bucket (to give access to the role in account A) as well as the IAM role in Account A having access to the bucket in B: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic-cross-account.html
upvoted 8 times
...
sumanshu
Most Recent 1 month, 2 weeks ago
Selected Answer: AD
Step 1: The application running on Account A’s EC2 instance sends a request to access the S3 bucket in Account B. Step 2: The EC2 instance in Account A must assume an IAM role from Account B. This is done via a trust policy that allows Account A’s EC2 instance to assume the role in Account B. Step 3: The IAM role in Account B allows access to the S3 bucket by having appropriate S3 permissions (e.g., s3:GetObject). Step 4: The S3 bucket policy in Account B needs to ensure that the IAM role in Account B has the permissions to access the bucket.
upvoted 1 times
sumanshu
1 month, 2 weeks ago
Both AD and BD looks correct https://stackoverflow.com/questions/77637011/how-to-provide-access-to-s3-buckets-in-a-different-aws-account
upvoted 1 times
sumanshu
1 week, 5 days ago
E - May be confusing - Trust policies do not define permissions like s3:Get*.
upvoted 1 times
...
...
...
AsmaZoheb
1 year ago
Selected Answer: BD
correct answer BD
upvoted 1 times
...
uakostya
1 year, 3 months ago
I have set up cross-account access to S3 and know in practice that the correct answers are B and D.
upvoted 1 times
...
casharan
1 year, 3 months ago
Selected Answer: AD
ChatGTP said: A. Create an IAM role with S3 read permissions in Account B. This IAM role should have a policy that allows it to read from the S3 bucket. D. Configure the bucket policy in Account B to grant permissions to the instance profile role. The bucket policy should be updated to allow the IAM role from Account A to access the bucket. Option B is not necessary because the IAM role with the necessary permissions is being created in Account B, not Account A. Option C is not recommended because making the S3 bucket public could expose it to unauthorized access. Option E is not correct because trust policies are used to delegate permissions to IAM entities, but in this case, we need to grant access to an S3 bucket, which is done through a bucket policy or an IAM policy.
upvoted 1 times
...
rcaliandro
1 year, 7 months ago
Selected Answer: BD
I was voting for A and B but reading the comments I totally agree with you guys, I changed my mind. The answer is B and D it's also explained in this YT tutorial: https://www.youtube.com/watch?v=Ob1zYHjqNwo
upvoted 3 times
...
SindhujaGanji
1 year, 7 months ago
I think it is B and D, for every cross-account access, trust policy is required.
upvoted 1 times
...
MrTee
1 year, 9 months ago
Selected Answer: AD
A. Create an IAM role with S3 read permissions in Account B. This will allow the application to assume the IAM role and access the S3 bucket in Account B. D. Configure the bucket policy in Account B to grant permissions to the instance profile role. This will allow the application running on the EC2 instances in Account A to access the S3 bucket in Account B by assuming the IAM role created in step A.
upvoted 1 times
ninomfr64
1 year, 5 months ago
A is not enough to allow the EC2 to assume the role in account B, you need also to create a trust relationship with the EC2 instance in account A
upvoted 1 times
...
...
Syre
1 year, 9 months ago
Selected Answer: AD
B, C, and E are incorrect because: B. Updating the instance profile IAM role in Account A with S3 read permissions is not the correct solution because the S3 bucket is in Account B, and the instance profile IAM role is in Account A. C. Making the S3 bucket public is not a recommended approach since it would expose the S3 bucket to anyone with the S3 bucket URL. E. Adding a trust policy that allows s3:Get* permissions to the IAM role in Account B is not necessary since the IAM role will be used to access the S3 bucket, not assume other roles.
upvoted 1 times
...
Krok
1 year, 10 months ago
Selected Answer: AD
I think that A & D
upvoted 1 times
...
nipu_ro
1 year, 11 months ago
i think the steps are A and B A. Create an IAM role with S3 read permissions in Account B. B. Update the instance profile IAM role in Account A with S3 read permissions. https://repost.aws/knowledge-center/s3-instance-access-bucket
upvoted 1 times
...
ShriniW
1 year, 12 months ago
Yes its BD . The scenario very well explained below https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic-cross-account.html
upvoted 1 times
...
speer
2 years, 1 month ago
Selected Answer: BD
Refer to links provided in the chats below. Correct answer B&D
upvoted 1 times
...
G4Exams
2 years, 2 months ago
Selected Answer: BD
It's B&D
upvoted 1 times
...
dark_cherrymon
2 years, 2 months ago
Selected Answer: DE
what about DE. it may not be B because yes ec2 needs access to s3 but the question is how to make the s3 bucket avaliable not whether or not the ec2 has the right to read from s3 E= make s3 bucket avaliable to be used by others D=use that s3 bucket. the instance is refering to the ec2
upvoted 1 times
...
haazybanj
2 years, 4 months ago
Selected Answer: BD
B and D is the answer
upvoted 2 times
...
Spamuel
2 years, 4 months ago
Selected Answer: BD
I think B & D https://aws.amazon.com/premiumsupport/knowledge-center/cross-account-access-s3/
upvoted 4 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago