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

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

An IAM user with fill EC2 permissions could bot start an Amazon EC2 instance after it was stopped for a maintenance task. Upon starting the instance, the instance state would change to `Pending`, but after a few seconds, it would switch back to `Stopped`.
An inspection revealed that the instance has attached Amazon EBS volumes that were encrypted by using a Customer Master Key (CMK). When these encrypted volumes were detached, the IAM user was able to start the EC2 instances.
The IAM user policy is as follows:

What additional items need to be added to the IAM user policy? (Choose two.)

  • A. kms:GenerateDataKey
  • B. kms:Decrypt
  • C. kms:CreateGrant
  • D. ג€Conditionג€: { ג€Boolג€: { ג€kms:ViaServiceג€: ג€ec2.us-west-2.amazonaws.comג€ } }
  • E. ג€Conditionג€: { ג€Boolג€: { ג€kms:GrantIsForAWSResourceג€: true } }
Show Suggested Answer Hide Answer
Suggested Answer: CE 🗳️

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
josellama2000
Highly Voted 3 years, 6 months ago
Agreed C and E are correct https://www.1strategy.com/blog/2018/01/09/ec2-encrypted-ebs-and-iam-users/
upvoted 65 times
Kalimalar
3 years, 6 months ago
thanks for this...clearly articulated
upvoted 3 times
...
Smartphone
3 years, 6 months ago
Well explained on the above provided link.
upvoted 5 times
...
...
DP15
Highly Voted 3 years, 7 months ago
Correct C and E! Need to add Action and Condition! "Action": "kms:CreateGrant", and "Condition": { "Bool": { "kms:GrantIsForAWSResource": true } }
upvoted 14 times
...
Raphaello
Most Recent 1 year, 2 months ago
Selected Answer: BC
Correct answers are BC. As per AWS guide: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html << Permissions for users When you use a KMS key for EBS encryption, the KMS key policy allows any user with access to the required AWS KMS actions to use this KMS key to encrypt or decrypt EBS resources. You must grant users permission to call the following actions in order to use EBS encryption: kms:CreateGrant kms:Decrypt kms:DescribeKey kms:GenerateDataKeyWithoutPlainText kms:ReEncrypt >> Clearly, without the condition "GrantIsForAWSResource" it will work still (it just add a restriction, not mandatory for operation). But without "kms:Decrypt" action, it will not work.
upvoted 2 times
virtual
1 year, 2 months ago
I think you are right. If it was made via CLI: 1) create-grant 2)operations "Decrypt/Encrypt/..." So best response seems to be BC
upvoted 1 times
...
...
Benah
1 year, 7 months ago
C & E is correct
upvoted 1 times
...
ITGURU51
1 year, 11 months ago
To allow an IAM user to start EC2 instances with encrypted EBS volumes without exposing the key to them, you can use the `kms:CreateGrant` permission in combination with the `kms:GrantIsForAWSResource` policy condition.
upvoted 1 times
...
arae
2 years, 6 months ago
Looks like its CE https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html
upvoted 2 times
...
sapien45
2 years, 7 months ago
Selected Answer: CE
By using the kms:CreateGrant permission, in combination with the kms:GrantIsForAWSResource policy condition, we can allow an IAM user to start EC2 instances with encrypted EBS volumes without exposing the key to them. This causes less headache on the IAM user’s end and still allows you to keep your keys secure. https://www.1strategy.com/blog/2018/01/09/ec2-encrypted-ebs-and-iam-users/
upvoted 1 times
...
sapien45
2 years, 9 months ago
Selected Answer: CE
The following example key policy statement uses the kms:GrantIsForAWSResource condition key. It allows AWS services that are integrated with AWS KMS, such as Amazon EBS, to create grants on this KMS key on behalf of the specified principal. { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:user/ExampleUser" }, "Action": "kms:CreateGrant", "Resource": "*", "Condition": { "Bool": { "kms:GrantIsForAWSResource": true } } }
upvoted 2 times
vbal
2 years, 7 months ago
this looks like an resource policy not an user policy.
upvoted 1 times
...
...
TollaMS
3 years, 5 months ago
CE { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "kms:CreateGrant" ], "Resource": [ "arn:aws:kms:<region>:<account #>:key/<key id>" ], "Condition": { "Bool": { "kms:GrantIsForAWSResource": true } } } ] }
upvoted 1 times
...
Kdosec
3 years, 5 months ago
C &E are correct, and it is really hard question :( https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html The following example key policy statement uses the kms:GrantIsForAWSResource condition key. It allows AWS services that are integrated with AWS KMS, such as Amazon EBS, to create grants on this CMK on behalf of the specified user. { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:user/ExampleUser" }, "Action": "kms:CreateGrant", "Resource": "*", "Condition": { "Bool": { "kms:GrantIsForAWSResource": true } } }
upvoted 4 times
...
sanjaym
3 years, 5 months ago
Ans: CE 100%
upvoted 1 times
...
ChinkSantana
3 years, 5 months ago
C and E are correct.
upvoted 1 times
...
stt
3 years, 5 months ago
A & C It is written in this AWS best practice "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "kms:GenerateDataKeyWithoutPlaintext", "kms:ReEncrypt*", "kms:CreateGrant" ], https://aws.amazon.com/blogs/compute/must-know-best-practices-for-amazon-ebs-encryption/
upvoted 1 times
examtaker12
3 years, 5 months ago
I think the question format confuse you. Here it ask for 1 <Action> and 1<Condition>. Thus you cannot choose A&C at the same time. C & E should be correct.
upvoted 1 times
...
...
devjava
3 years, 6 months ago
Ans > C,E https://www.1strategy.com/blog/2018/01/09/ec2-encrypted-ebs-and-iam-users/
upvoted 1 times
...
AfricanCloudGuru
3 years, 6 months ago
Ans (C and E) https://www.1strategy.com/blog/2018/01/09/ec2-encrypted-ebs-and-iam-users/
upvoted 1 times
...
AfricanCloudGuru
3 years, 6 months ago
Ans (C and E) https://www.1strategy.com/blog/2018/01/09/ec2-encrypted-ebs-and-iam-users/
upvoted 1 times
...
kmaiti
3 years, 6 months ago
C and E are correct. A - Incorrect, It's not required to create Datakey as it is already present on EBS. B - Incorrect, Technically this option is required too. When ec2 calls KMS for decryption the datakey. C - Correct, EBS sends a CreateGrant request to AWS KMS, so that it can decrypt the data key. D - Incorrect, over option E. Technically D and E both are correct but D works for us-west-2 region for ec2 only whereas E will allow for all region and all aws services inluding ec2. Here question didn't specify region. Thus we have to avoid region restriction. E - correct , see reason stated for D ref : https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-via-service https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-grant-is-for-aws-resource
upvoted 4 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