ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 57 - DVA-C02 discussion

Report
Export

A developer has written the following IAM policy to provide access to an Amazon S3 bucket:

Which access does the policy allow regarding the s3:GetObject and s3:PutObject actions?

A.
Access on all buckets except the "DOC-EXAMPLE-BUCKET" bucket
Answers
A.
Access on all buckets except the "DOC-EXAMPLE-BUCKET" bucket
B.
Access on all buckets that start with "DOC-EXAMPLE-BUCKET" except the "DOC-EXAMPLEBUCKET/ secrets" bucket
Answers
B.
Access on all buckets that start with "DOC-EXAMPLE-BUCKET" except the "DOC-EXAMPLEBUCKET/ secrets" bucket
C.
Access on all objects in the "DOC-EXAMPLE-BUCKET" bucket along with access to all S3 actions for objects in the "DOC-EXAMPLE-BUCKET" bucket that start with "secrets"
Answers
C.
Access on all objects in the "DOC-EXAMPLE-BUCKET" bucket along with access to all S3 actions for objects in the "DOC-EXAMPLE-BUCKET" bucket that start with "secrets"
D.
Access on all objects in the "DOC-EXAMPLE-BUCKET" bucket except on objects that start with "secrets"
Answers
D.
Access on all objects in the "DOC-EXAMPLE-BUCKET" bucket except on objects that start with "secrets"
Suggested answer: D

Explanation:

The IAM policy shown in the image is a resource-based policy that grants or denies access to an S3 bucket based on certain conditions. The first statement allows access to any S3 action on any object in the "DOC-EXAMPLE-BUCKET" bucket when the request is made over HTTPS (the value of aws:SecureTransport is true). The second statement denies access to the s3:GetObject and s3:PutObject actions on any object in the "DOC-EXAMPLE-BUCKET/secrets" prefix when the request is made over HTTP (the value of aws:SecureTransport is false). Therefore, the policy allows access on all objects in the "DOC-EXAMPLE-BUCKET" bucket except on objects that start with "secrets".

Reference: Using IAM policies for Amazon S3

asked 16/09/2024
Welton Harris
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first