exam questions

Exam AWS DevOps Engineer Professional All Questions

View all questions & answers for the AWS DevOps Engineer Professional exam

Exam AWS DevOps Engineer Professional topic 1 question 38 discussion

Exam question from Amazon's AWS DevOps Engineer Professional
Question #: 38
Topic #: 1
[All AWS DevOps Engineer Professional Questions]

A company is using an AWS CodeBuild project to build and package an application. The packages are copied to a shared Amazon S3 bucket before being deployed across multiple AWS accounts.
The buildspec.yml file contains the following:

The DevOps Engineer has noticed that anybody with an AWS account is able to download the artifacts.
What steps should the DevOps Engineer take to stop this?

  • A. Modify the post_build to command to use ג€"-acl public-read and configure a bucket policy that grants read access to the relevant AWS accounts only.
  • B. Configure a default ACL for the S3 bucket that defines the set of authenticated users as the relevant AWS accounts only and grants read-only access.
  • C. Create an S3 bucket policy that grants read access to the relevant AWS accounts and denies read access to the principal ג€*ג€
  • D. Modify the post_build command to remove ג€"-acl authenticated-read and configure a bucket policy that allows read access to the relevant AWS accounts only.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
Timli
Highly Voted 3 years, 7 months ago
D is my choose https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
upvoted 22 times
pleasespammelater
3 years, 6 months ago
"S3 ACLs is a legacy access control mechanism that predates IAM". That is, don't use them! https://aws.amazon.com/blogs/security/iam-policies-and-bucket-policies-and-acls-oh-my-controlling-access-to-s3-resources/
upvoted 3 times
...
...
michelleY
Highly Voted 3 years, 6 months ago
i will go with D. C is not correct, if you have deny *, allow AuthenticatedUsers still doesn't allow the access. authenticated-read vs public-read, one is for Owner gets FULL_CONTROL. The AuthenticatedUsers group gets READ access., the other one is Owner gets FULL_CONTROL. The AllUsers group (see Who Is a Grantee?) gets READ access.
upvoted 7 times
...
m4r0ck
Most Recent 1 year, 9 months ago
Selected Answer: D
D - When setting the flag authenticated-read in the command line, the owner gets FULL_CONTROL. The AuthenticatedUsers group (Anyone with an AWS account) gets READ access. Reference: https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html
upvoted 1 times
...
BelloMio
2 years, 2 months ago
I think it's D, If you don't specify any acl command then acl is not enabled for the bucket which means that the objects accesses are defined only by the bucket policy.
upvoted 1 times
...
Piccaso
2 years, 2 months ago
Selected Answer: A
Of course, B and C are excluded. C is self-contradicted, B is not completed. D looks like the best, because AWS suggested to stop using ACL on S3 buckets. However, if we only remove the "acl authenticated-read", but not use bucket's ownership to change the default behaviour that uploader of the objects has access, the bucket's owner will not have access to the object and set up policies to the objects.
upvoted 2 times
...
Piccaso
2 years, 2 months ago
Selected Answer: D
D looks consistent.
upvoted 1 times
Piccaso
2 years, 2 months ago
I changed my mind. I pick A.
upvoted 1 times
itbrpl
2 years, 1 month ago
Why do you do that to every question? Why do you make a random comment and later starts to flip from one option to another... Stop that...
upvoted 9 times
...
...
...
Bulti
2 years, 3 months ago
Correct answer is D. Best practice is to limit the use of ACL and grant access using bucket policy. So in this case it's about allowing access to the bucket to specific AWS accounts and not to every authenticated user or all AWS accounts which are options A and B. I am not sure how Option C would work. It's talking about denying access to the principal. But I am not sure how access can be provided to the account but not to the Role or user in that account.
upvoted 1 times
...
PepsNick
2 years, 3 months ago
D is my choice. AWS does not recommend the usage of ACL's. Below is the explanation from https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html A majority of modern use cases in Amazon S3 no longer require the use of ACLs, and we recommend that you disable ACLs except in unusual circumstances where you need to control access for each object individually. With Object Ownership, you can disable ACLs and rely on policies for access control. When you disable ACLs, you can easily maintain a bucket with objects uploaded by different AWS accounts. You, as the bucket owner, own all the objects in the bucket and can manage access to them using policies. For more information, see Controlling ownership of objects and disabling ACLs for your bucket.
upvoted 1 times
...
Milind
2 years, 4 months ago
https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
upvoted 1 times
...
DonWang
2 years, 4 months ago
Selected Answer: D
I choose D
upvoted 1 times
...
huonguyenlt
2 years, 4 months ago
Selected Answer: D
D is my choose https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
upvoted 2 times
...
blueorca
3 years, 2 months ago
Selected Answer: D
I choose D
upvoted 1 times
...
aws_Tamilan
3 years, 5 months ago
Correct Answer: D You can define bucket policy using NotPrincipal to grant permission to specified accounts or users while it explicitly denies access from other users. https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_notprincipal.ht ml
upvoted 2 times
...
benLLP
3 years, 5 months ago
C is my choose https://aws.amazon.com/blogs/security/how-to-restrict-amazon-s3-bucket-access-to-a-specific-iam-role/
upvoted 1 times
...
kyo
3 years, 5 months ago
I think the answer is A. https://docs.aws.amazon.com/cli/latest/userguide/cli-services-s3-commands.html When running s3 sync in the post_build section, granting public-read makes it available for download to anyone who knows the URL.
upvoted 1 times
...
bnagaraja9099
3 years, 5 months ago
I go with A. Most restrictive access. public_read definition: Owner gets FULL_CONTROL. The AllUsers group (see Who Is a Grantee?) gets READ access. https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl A grantee can be an AWS account or one of the predefined Amazon S3 groups. You grant permission to an AWS account using the email address or the canonical user ID. https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#specifying-grantee
upvoted 1 times
...
iptorrent786
3 years, 5 months ago
Answer is C
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago