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

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

An Amazon EC2 instance is denied access to a newly created AWS KMS CMK used for decrypt actions. The environment has the following configuration:
✑ The instance is allowed the kms:Decrypt action in its IAM role for all resources
✑ The AWS KMS CMK status is set to enabled
✑ The instance can communicate with the KMS API using a configured VPC endpoint
What is causing the issue?

  • A. The kms:GenerateDataKey permission is missing from the EC2 instance's IAM role
  • B. The ARN tag on the CMK contains the EC2 instance's ID instead of the instance's ARN
  • C. The kms:Encrypt permission is missing from the EC2 IAM role
  • D. The KMS CMK key policy that enables IAM user permissions is missing
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
RaySmith
Highly Voted 3 years, 8 months ago
D seems corr
upvoted 11 times
...
DanMuniz
Highly Voted 3 years, 8 months ago
I believe D is wrong. But guys, I would go for D, the problem is the question. It's stating "EC2 Instance" and this should be IAM Role and option D is wrong IMHO because of this, this is NOT IAM user.
upvoted 6 times
Ayusef
3 years, 8 months ago
I agree with you. The wording was correct until it said user.
upvoted 2 times
...
...
Raphaello
Most Recent 1 year, 4 months ago
Selected Answer: D
D The KMS default key policy (uppermost part of the policy) that delegates permissions to IAM identity policies, is missing.
upvoted 1 times
...
rajkanch
1 year, 12 months ago
A - > https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-key-management.html#sqs-what-permissions-for-sse
upvoted 1 times
...
rajkanch
1 year, 12 months ago
This has to be A
upvoted 1 times
...
ITGURU51
2 years ago
The best answer is D because the EC2 instance needs permissions to use the newly created key.
upvoted 1 times
...
Dmosh
2 years, 1 month ago
Selected Answer: D
Not A, we are not speaking of encryption.
upvoted 1 times
...
boooliyooo
2 years, 5 months ago
Selected Answer: D
Option A, the kms:GenerateDataKey permission being missing from the EC2 instance's IAM role, would not cause the issue, as the kms:Decrypt action is allowed for all resources in the role.
upvoted 2 times
...
[Removed]
2 years, 6 months ago
The issue is caused by the fact that the KMS CMK key policy that enables IAM user permissions is missing. In order for the Amazon EC2 instance to have access to the AWS KMS CMK and be able to perform decrypt actions, the KMS CMK key policy must be configured to grant the necessary permissions to the EC2 instance's IAM role. In order to fix the issue, the Security team can update the KMS CMK key policy to grant the EC2 instance's IAM role the necessary permissions for decrypt actions. This will allow the EC2 instance to access the KMS CMK and perform decrypt actions as needed.
upvoted 1 times
...
AshishFL
2 years, 6 months ago
The key is 'Newly Created'. The key policy by default has the IAM user permissions. So D is wrong. GenerateDataKey permission is required to decrypt using the key. A is the right answer. If the key was not 'new' and someone changed the default key policy to remove the account root permission required to manage IAM permissions, then D may have been viable option.
upvoted 2 times
matrpro
2 years, 1 month ago
Hello, I see what you mean but if the ec2 can access other older CMK keys it is because it has already allowed the GenerateDataKey. It is another tricky AWS' question with 2 feasible valid options. I am going to think that this ec2 instance es the 1st time that is using KMS and that the new CMK does not have root as a principal to allow IAM to manage the permissions. C would be my choice.
upvoted 1 times
...
...
jAWStest
2 years, 7 months ago
Selected Answer: D
key policy should allow root user in order for IAM policies to work
upvoted 1 times
...
Fyssy
2 years, 7 months ago
Selected Answer: A
https://stackoverflow.com/questions/66543870/aws-kms-why-do-i-need-the-kmsdecrypt-permission-when-i-try-to-encrypt-data
upvoted 3 times
...
VijiTu
2 years, 9 months ago
Answer D - Unless the key policy explicitly allows it, you cannot use IAM policies to allow access to a KMS key. Without permission from the key policy, IAM policies that allow permissions have no effect.
upvoted 1 times
...
sapien45
2 years, 9 months ago
Selected Answer: D
That is right. you could use IAM policies (EC2 instances roles for example) only if KMS policies allow you to do so.
upvoted 1 times
ITGURU51
2 years ago
Key policies are the primary way to control access to KMS keys. Every KMS key must have exactly one key policy. The statements in the key policy determine who has permission to use the KMS key and how they can use it.
upvoted 1 times
...
...
teo2157
3 years, 2 months ago
After some researchs go for D https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
upvoted 1 times
...
chengxu32
3 years, 7 months ago
D is correct Although I want to see "IAM role" instead of "IAM user", but ok with it since "IAM user" is a legit principle A is not correct because GenerateDataKey is needed for envelope encryption. In this question, it is about using CMK, so data key is irrelevant
upvoted 5 times
...
Huy
3 years, 7 months ago
Every CMK must have exactly one key policy. The statements in the key policy document determine who has permission to use the CMK and how they can use it. Key users = IAM users + IAM Roles So D is correct.
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 ...