SCS-C02 · Question #332
Your company has an external web site. This web site needs to access the objects in an S3 bucket. Which of the following would allow the web site to access the objects in the most secure manner?
The correct answer is B. Use the aws:Referer key in the condition clause for the bucket policy. An example of this is given intheAWS Documentatioi Restricting Access to a Specific HTTP with links to photos and videos stored in your S3 bucket examplebucket. By default, all the S3 resources are private, so only the AWS account that created the resources can access them. To…
Question
Your company has an external web site. This web site needs to access the objects in an S3 bucket. Which of the following would allow the web site to access the objects in the most secure manner?
Exhibit
Options
- AGrant public access for the bucket via the bucket policy
- BUse the aws:Referer key in the condition clause for the bucket policy
- CUse the aws:sites key in the condition clause for the bucket policy
- DGrant a role that can be assumed by the web site
How the community answered
(33 responses)- A9% (3)
- B76% (25)
- C12% (4)
- D3% (1)
Explanation
An example of this is given intheAWS Documentatioi Restricting Access to a Specific HTTP with links to photos and videos stored in your S3 bucket examplebucket. By default, all the S3 resources are private, so only the AWS account that created the resources can access them. To allow read access to these objects from your website, you can add a bucket policy that allows s3:GetObject permission with a condition, using the aws:referer key, that the get request must originate from specific webpages. The following policy specifies the StringLike condition with the aws:Referer condition key. Option A is invalid because giving public access is not a secure way to provide access Option C is invalid because aws:sites is not a valid condition key Option D is invalid because IAM roles will not be assigned to web sites https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html
Topics
Community Discussion
No community discussion yet for this question.
