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

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

The AWS Systems Manager Parameter Store is being used to store database passwords used by an AWS Lambda function. Because this is sensitive data, the parameters are stored as type SecureString and protected by an AWS KMS key that allows access through IAM. When the function executes, this parameter cannot be retrieved as the result of an access denied error.
Which of the following actions will resolve the access denied error?

  • A. Update the ssm.amazonaws.com principal in the KMS key policy to allow kms: Decrypt.
  • B. Update the Lambda configuration to launch the function in a VPC.
  • C. Add a policy to the role that the Lambda function uses, allowing kms: Decrypt for the KMS key.
  • D. Add lambda.amazonaws.com as a trusted entity on the IAM role that the Lambda function uses.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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, 7 months ago
A ssm (System Manager) has nothing to do with the question B is irrelevant. Lambdas run on their own VPC C is correc.t D is incorrect. Irrelevant. Trusted entity is the entity allowed to assume a IAM role. It is the principal of the role
upvoted 43 times
exams
3 years, 7 months ago
Agree. C is correct Both encrypted and plaintext parameter values are stored with only the Lambda function having permissions to decrypt the secrets.
upvoted 9 times
cloudprincipal
3 years, 7 months ago
Agree, C is correct
upvoted 3 times
...
...
...
johndoe
Highly Voted 3 years, 7 months ago
Trying to bring my contribution to this topic As per this link this is how you create an IAM policy to access AWS KMS { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "kms:Decrypt", ], "Resource": "arn:aws-cn:kms:<region>:<123456789012>:key/<key-ID>" } ] } Then you can save your policy and assign it to the IAM role you will create after that for the lambda function https://docs.amazonaws.cn/en_us/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.IAM.KMSCreatePolicy.html So answer C makes sense to me too Merry xmas ;)
upvoted 22 times
...
Raphaello
Most Recent 1 year, 3 months ago
Selected Answer: C
Lambda execution role needs to have permission to use KMS key (kms:Decrypt). Correct answer is C
upvoted 1 times
...
ITGURU51
1 year, 11 months ago
The correct answer is C because the Lambda function needs the decrypt permission to perform the task.
upvoted 1 times
...
awsmonkey
2 years, 5 months ago
Selected Answer: C
It is a testable scenario. Answer is C.
upvoted 1 times
...
hubekpeter
2 years, 5 months ago
Selected Answer: C
When Secrets Manager uses a KMS key in cryptographic operations, it acts on behalf of the user who is accessing or updating the secret value
upvoted 2 times
...
lotfi50
2 years, 11 months ago
Selected Answer: C
C is correct
upvoted 2 times
...
ashmek
3 years ago
C is the correct answer from other sites as well.
upvoted 1 times
...
Kdosec
3 years, 6 months ago
The answer A is not correct but the attached link below answer is correct. https://aws.amazon.com/blogs/compute/sharing-secrets-with-aws-lambda-using-aws-systems-manager-parameter-store/ The link guide that Lambda policy need to allow access key, not related to SSM.
upvoted 1 times
...
Larsson
3 years, 6 months ago
C I say is correct here. The Lambda execution role needs getparameter and decrypt. SSM itself is not the principal. Right?
upvoted 2 times
...
Huy
3 years, 6 months ago
2 ways to fix this: - Add a policy to allow the Lambda function's execution role to Decrypt the CMK (Option C) - Add Lambda's function's execution role to the "key users"
upvoted 1 times
...
Ghostbusters
3 years, 6 months ago
This is another tricky one. Here is how we should think about it. Firstly, it is easy to dismiss B and D. B is complete BS, and D is not so much, as whatever D states must be true for the Lambda to even run. As the question states that the Lambda ran, so D can be dismissed. Left with A and C. Here is the fundamental knowledge needed: If a compute actor is trying to retrieve an encrypted key from SSM, does that Compute actor need the permission to access (specifically decrypt) the CMK, or does SSM need it? Answer is: the compute actor. KMS key policy provide does provide an alternative to this, which is the "ViaService" condition. But if we are using ViaService, then ssm.amazonaws.com will be specified not as the Principal, but as the ViaService. Hence, the correct answer is C, not A.
upvoted 7 times
...
Melymel
3 years, 6 months ago
In AWS Identity and Access Management (IAM), you can grant or deny a service access to resources using the Principal policy element. The Principal policy element value for Systems Manager is ssm.amazonaws.com.
upvoted 1 times
...
devjava
3 years, 6 months ago
Ans > C
upvoted 1 times
...
AfricanCloudGuru
3 years, 6 months ago
Ans (A) https://aws.amazon.com/blogs/compute/sharing-secrets-with-aws-lambda-using-aws-systems-manager-parameter-store/
upvoted 1 times
HananS
3 years, 6 months ago
Please your answer and the link doesn't match
upvoted 1 times
...
...
Ayusef
3 years, 6 months ago
Dano is Kimo..
upvoted 2 times
...
Dic
3 years, 6 months ago
Ans is C, clearly mentioned here https://docs.aws.amazon.com/kms/latest/developerguide/services-parameter-store.html
upvoted 2 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