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

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

A Developer is creating an AWS Lambda function that requires environment variables to store connection information and logging settings. The Developer is required to use an AWS KMS Customer Master Key (CMK) supplied by the Information Security department in order to adhere to company standards for securing
Lambda environment variables.
Which of the following are required for this configuration to work? (Choose two.)

  • A. The Developer must configure Lambda access to the VPC using the --vpc-config parameter.
  • B. The Lambda function execution role must have the kms:Decrypt permission added in the AWS IAM policy.
  • C. The KMS key policy must allow permissions for the Developer to use the KMS key.
  • D. The AWS IAM policy assigned to the Developer must have the kms:GenerateDataKey permission added.
  • E. The Lambda execution role must have the kms:Encrypt permission added in the AWS IAM policy.
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

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
freddyman
Highly Voted 3 years, 7 months ago
B and C, I'm 99% sure after doing the research. Lambda uses the Encrypt and Decrypt calls, rather than GenerateDataKey which is for envelope encryption. This documentation helps understand that https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html To use a customer managed CMK, you need permission to use the key. Lambda uses your permissions to create a grant on the key. This allows Lambda to use it for encryption: - kms:ListAliases – To view keys in the Lambda console. - kms:CreateGrant, kms:Encrypt – To configure a customer managed CMK on a function. - kms:Decrypt – To view and manage environment variables that are encrypted with a customer managed CMK. A: VPC is not relevant. B: Lambda needs to be able to decrypt the parameter values the developer stored. C: Developer needs to be able to encrypt data to be stored in the parameter. D: No, lambda parameters use direct encryption not envelope encryption E: Lambda decrypts the parameters the developer stores, it doesn't need to encrypt.
upvoted 55 times
sapien45
2 years, 9 months ago
Thank for your researches BC
upvoted 1 times
...
NSF2
3 years, 3 months ago
In contrary, I would think that it must be BE, as per below statement. https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html Managing permissions to your server-side encryption KMS key No AWS KMS permissions are required for your user or the function's execution role to use the default encryption key. To use a customer managed key, you need permission to use the key. Lambda uses your permissions to create a grant on the key. This allows Lambda to use it for encryption. kms:ListAliases – To view keys in the Lambda console. kms:CreateGrant, kms:Encrypt – To configure a customer managed key on a function. kms:Decrypt – To view and manage environment variables that are encrypted with a customer managed key.
upvoted 6 times
freddyman
1 year, 10 months ago
The question specifies an AWS KMS Customer Master Key, rather than the default encryption key
upvoted 1 times
...
...
...
PeppaPig
Highly Voted 3 years, 7 months ago
B&C B: Lambda function role must have the KMS permissions to decrypt and use the environment variables in plaintext. C: The developer must have access to the CMK in order to encrypt the variables
upvoted 13 times
...
Arad
Most Recent 11 months ago
Selected Answer: BE
BE is the correct answer, as Lambda needs both encrypt and decrypt access. C is wrong as it asks for Developer access not Lambda.
upvoted 1 times
...
Raphaello
1 year, 2 months ago
Selected Answer: BC
B is understandable. C is the best of the rest, yet I don't get why the developer needs to be able to "use" the key. No, he doesn't need to.
upvoted 1 times
Raphaello
1 year, 2 months ago
Ofc the developer needs to be able to use the key, and so to view/manage the environment variables!
upvoted 1 times
...
...
RosenYordanov
1 year, 5 months ago
Selected Answer: BC
B. The Lambda function execution role must have the kms:Decrypt permission added in the AWS IAM policy. C. The KMS key policy must allow permissions for the Developer to use the KMS key. These permissions ensure that the Lambda function can decrypt environment variables secured with the specified KMS key.
upvoted 1 times
...
sprial02
1 year, 8 months ago
B&E is really 100% correct, Because https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
upvoted 1 times
...
Green53
1 year, 10 months ago
Selected Answer: BC
https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption It states the following are required: kms:ListAliases – To view keys in the Lambda console. kms:CreateGrant, kms:Encrypt – To configure a customer managed key on a function. kms:Decrypt – To view and manage environment variables that are encrypted with a customer managed key. You can get these permissions from your AWS account or from a key's resource-based permissions policy. ListAliases is provided by the managed policies for Lambda. Key policies grant the remaining permissions to users in the Key users group. B provides the Decrypt permission via policy for Lambda. C is required for the initial set up of the Lamdba function
upvoted 1 times
...
Tofu13
1 year, 11 months ago
Selected Answer: BC
"No AWS KMS permissions are required for your user or the function's execution role to use the default encryption key. To use a customer managed key, you need permission to use the key." This strongly suggests C. https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#managing-permissions-to-your-server-side-encryption-key Answer D "kms:GenerateDataKey" would be needed for other services, but not Lambda. https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-key-management.html#sqs-what-permissions-for-sse
upvoted 1 times
...
ITGURU51
2 years ago
Amazon Cognito user pools allow sign-in through a third party (federation), including through a SAML IdP such as AD FS. For more information, see Adding user pool sign-in through a third party and Adding SAML identity providers to a user pool. You can set up an AD FS server and domain controller on an Amazon Elastic Compute Cloud (Amazon EC2) Windows instance, and then integrate your setup with your user pool using Amazon Cognito's hosted web UI.
upvoted 1 times
...
boooliyooo
2 years, 3 months ago
Selected Answer: BC
For the Developer to create an AWS Lambda function that requires environment variables to store connection information and logging settings using an AWS KMS CMK supplied by the Information Security department, the following configurations are required: B. The Lambda function execution role must have the kms:Decrypt permission added in the AWS IAM policy. C. The KMS key policy must allow permissions for the Developer to use the KMS key. The Lambda function execution role must have the kms:Decrypt permission added in the AWS IAM policy, as this permission allows the function to decrypt the data stored in the environment variables. The KMS key policy must allow permissions for the Developer to use the KMS key, as this allows the Developer to encrypt and decrypt data using the key.
upvoted 1 times
...
Fyssy
2 years, 5 months ago
Selected Answer: BD
https://stackoverflow.com/questions/66543870/aws-kms-why-do-i-need-the-kmsdecrypt-permission-when-i-try-to-encrypt-data
upvoted 1 times
...
VijiTu
2 years, 7 months ago
Based on the definition from the aws docs Lambda uses your permissions to create a grant on the key. This allows Lambda to use it for encryption. kms:ListAliases – To view keys in the Lambda console. kms:CreateGrant , kms:Encrypt – To configure a customer managed key on a function. Answer - BD
upvoted 1 times
...
Root_Access
2 years, 7 months ago
Selected Answer: BC
B: kms:Decrypt – To view and manage environment variables that are encrypted with a customer managed key. C: Lambda uses your permissions to create a grant on the key. Lambda doesnt need explicit encrypt permission it uses the created grant.
upvoted 3 times
...
tatdatpham
2 years, 8 months ago
Selected Answer: BC
No need Encrypt in here
upvoted 4 times
...
dcasabona
2 years, 9 months ago
Selected Answer: BE
Since the CMK has already been created by security team, my understanding is that the execution role needs the decrypt permission (B) to read the environment variables from parameters store and the encrypt permission (E) to store logs files. Option C is wrong because who needs permission is the Lambda Execution role not the developer. Option D could be as well, but it seems that "lambda parameters use direct encryption not envelope encryption"...
upvoted 3 times
...
ude
2 years, 9 months ago
Selected Answer: BE
E - you must GRANT YOUR LAMBDA KMS PERMISSIONS
upvoted 2 times
...
gofavad926
2 years, 9 months ago
Selected Answer: BE
BE, developer will use the key through Lambda Function
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