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 405 discussion

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

A developer needs to secure the static assets in a company’s Amazon S3 bucket that is named DOC-EXAMPLE-BUCKET. The company has an Amazon CloudFront distribution that serves the S3 bucket’s assets to the public. The developer has already created the origin access identity (OAI) and has associated the OAI with the distribution. The developer must write a bucket policy that allows only the CloudFront distribution to access the S3 bucket.

Which policy will meet this requirement MOST securely?

  • A.
  • B.
  • C.
  • D.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
[Removed]
2 years ago
Selected Answer: A
i think A
upvoted 1 times
...
pancman
2 years, 3 months ago
Selected Answer: A
I think both A and C would work. I don't see any issues with C. Having a /* at the end of the bucket name would have the same impact with the answer in A.
upvoted 1 times
AmberTheTamber
2 years, 2 months ago
Not exactly. The bucket without the /* can be mistaken with another bucket that has the same starting string. This can potentially allow access to another bucket with a similar name whereas the name with the /* signifies an absolute object name.
upvoted 5 times
pancman
2 years, 2 months ago
Good catch!
upvoted 1 times
...
clarksu
2 years, 1 month ago
If the "/*" is missing after the bucket name in an S3 bucket policy, it would imply that the policy only applies to the root of the bucket and not to any objects within the bucket. This means that while users may be able to perform certain actions at the root level of the bucket, they may not be able to perform those same actions on individual objects within the bucket. Including "/*" after the bucket name in a bucket policy will ensure that the policy applies to all objects within the bucket, rather than just to the root level of the bucket.
upvoted 2 times
...
...
...
Phinx
2 years, 3 months ago
Selected Answer: A
The question is very vague. It does not specifically states what access is required. But to be safe, I would go with A.
upvoted 2 times
...
KT_Yu
2 years, 3 months ago
Selected Answer: A
https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-access-to-amazon-s3/
upvoted 2 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