exam questions

Exam AWS Certified Security - Specialty All Questions

View all questions & answers for the AWS Certified Security - Specialty exam

Exam AWS Certified Security - Specialty topic 1 question 235 discussion

Exam question from Amazon's AWS Certified Security - Specialty
Question #: 235
Topic #: 1
[All AWS Certified Security - Specialty Questions]

A company uses an Amazon S3 bucket to store reports. Management has mandated that all new objects stored in this bucket must be encrypted at rest using server-side encryption with a client specified AWS Key Management Service (AWS KMS) CMK owned by the same account as the S3 bucket. The AWS account number is 111122223333, and the bucket name is reportbucket. The company's security specialist must write the S3 bucket policy to ensure the mandate can be implemented.
Which statement should the security specialist include in the policy?
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
DayQuil
Highly Voted 3 years, 7 months ago
Answer is D. https://aws.amazon.com/premiumsupport/knowledge-center/s3-bucket-store-kms-encrypted-objects/
upvoted 40 times
...
awsguru1998
Highly Voted 2 years, 2 months ago
B https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html there is no stringnotlikeifexists
upvoted 5 times
...
yorkicurke
Most Recent 1 year, 4 months ago
Ans: D Subtle but Crucial distinction; For example, in an AWS S3 bucket policy, if you want to deny objects without a specified ACL, you might use StringNotLike. However, if the x-amz-acl condition is not behaving as expected (for instance, denying a simple put with no ACL), you could consider using StringNotLikeIfExists. The difference between StringNotLike and StringNotLikeIfExists lies in how they handle the absence of the specified key in the request. ---> [Important part] With StringNotLike, if the key (s3:x-amz-acl in our examples) is not present in the request, the condition returns false, and the policy statement is not applied. <------ This means that if the key is missing, the action (s3:PutObject) is not denied. With StringNotLikeIfExists, if the key is not present in the request, the condition returns true, and the policy statement is applied. <------ This means that if the key is missing, the action is denied.
upvoted 3 times
yorkicurke
1 year, 4 months ago
if this was too cryptic or short on time just remember that; While both conditions deny the action if the key’s value is public-read or public-read-write, they behave differently when the key is absent. This can be important depending on whether you want to allow or deny actions by default when the key is not provided. Hope that helps. Good Luck!
upvoted 2 times
...
...
Raphaello
1 year, 5 months ago
C Not A. Please note the key that is required to be used is KMS key (SSE-KMS), not SSE-S3 for which the condition is "AES256" https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#require-sse-kms
upvoted 1 times
Raphaello
1 year, 2 months ago
Ofc C is not correct! :D It is D. By specifying the ARN to the key(s) we ensure the used KMS keys belong to the same account as requested in the scenario. To use "StringNotLifeIfExists" to ensure that if the condition does not exist (KMS key), still deny the action. Fail close vs Fail Open..if you know what I mean!
upvoted 1 times
...
...
Salah21
1 year, 7 months ago
B is the correct answer https://repost.aws/knowledge-center/s3-bucket-store-kms-encrypted-objects ... "Encryption headers are headers such as x-amz-server-side-encryption and x-amz-server-side-encryption-aws-kms-key-id" https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html ... "StringLikeIfExists. You do this to say "If the policy key is present in the context of the request, process the key as specified in the policy. If the key is not present, evaluate the condition element as true."
upvoted 1 times
...
Shenannigan
1 year, 8 months ago
B is correct StringNotLike which means the condition will be evaluated for all requests, whether or not the "s3:x-amz-server-side-encryption-aws-kms-key-id" key is present in the request Option D uses "StringNotLikeIfExists," which means the condition will only be evaluated if the "s3:x-amz-server-side-encryption-aws-kms-key-id" key exists in the request. If the key doesn't exist in the request, the condition won't be evaluated, and the Deny effect won't be applied
upvoted 2 times
...
addy_prepare
1 year, 8 months ago
C -https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html. Pay attention, when you are use "s3:x-amz-server-side-encryption-aws-kms-key-id" you should specify exact key. (as I understood)
upvoted 2 times
...
addy_prepare
1 year, 9 months ago
D - https://docs.aws.amazon.com/AmazonS3/latest/userguide/specifying-kms-encryption.html
upvoted 2 times
...
Vedi1
1 year, 10 months ago
Answer should be "C" https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html
upvoted 1 times
...
Green53
1 year, 11 months ago
The answer is D: https://repost.aws/knowledge-center/s3-bucket-store-kms-encrypted-objects Which has this exact example.
upvoted 3 times
...
p4v10
1 year, 11 months ago
Its B guys for sure!
upvoted 1 times
...
Toptip
1 year, 11 months ago
Not D... tricky question... Nice try AWS :) Be careful from AWS trolls in the comments they write wrong answers to mislead you...
upvoted 3 times
...
Nan001
2 years, 2 months ago
D I am not chosing B because, it has wildcard in it is using `StringNotEquals`. Whereas option D has like operator with a wildcard.
upvoted 1 times
...
maddyr
2 years, 5 months ago
D is correct
upvoted 1 times
...
rrshah83
2 years, 6 months ago
B. You don’t want to allow other methods of encryption such as AES-256. Key is mandatory.
upvoted 3 times
...
bobby_kl
2 years, 8 months ago
Answer D: https://aws.amazon.com/premiumsupport/knowledge-center/s3-bucket-store-kms-encrypted-objects/
upvoted 2 times
...
sapien45
2 years, 8 months ago
D. Use Amazon S3 default encryption to be sure that objects uploaded without encryption headers (such as x-amz-server-side-encryption and x-amz-server-side-encryption-aws-kms-key-id) are encrypted by AWS KMS before they are stored in your S3 bucket. Then, use the bucket policy to be sure that objects with another encryption setting (AES-256) can't be uploaded, and that objects uploaded with AWS KMS encryption contain a key ID from your AWS account.
upvoted 3 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