Courseiva
Question 531 of 724
SecurityhardMultiple ChoiceObjective-mapped

DVA-C02 Security Practice Question

A developer is using AWS Lambda to process sensitive data. The Lambda function needs to access a DynamoDB table that is encrypted with a customer-managed CMK. The developer is using the default Lambda execution role. What must be done to allow Lambda to decrypt the DynamoDB table?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Add a policy to the KMS key that allows the Lambda execution role to perform kms:Decrypt.

The DynamoDB table is encrypted with a customer-managed CMK. The Lambda execution role must be granted permission to use that key. This is done by adding a statement to the KMS key's key policy that allows the Lambda execution role to perform kms:Decrypt. DynamoDB will then perform the decryption on behalf of Lambda. Option A is incorrect because dynamodb:GetItem alone does not grant KMS decrypt permissions. Option C is incorrect because a VPC endpoint is not related to KMS permissions. Option D is incorrect because Lambda does not need to directly call the KMS Decrypt API; the key policy handles the authorization.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Add a policy to the Lambda execution role allowing dynamodb:GetItem.

    Why it's wrong here

    Adding dynamodb:GetItem to the Lambda execution role grants the function permission to retrieve items from a DynamoDB table. However, this permission only covers data access and does not inherently include the necessary authorization to decrypt data encrypted with AWS Key Management Service (KMS). To access encrypted data, the Lambda's execution role must also be explicitly granted kms:Decrypt permissions by the KMS key policy associated with the DynamoDB table's encryption key.

  • Add a policy to the KMS key that allows the Lambda execution role to perform kms:Decrypt.

    Why this is correct

    The KMS key policy must allow the Lambda execution role to perform kms:Decrypt. This is required because DynamoDB uses server-side encryption with KMS, and the service needs to decrypt data on behalf of the Lambda function.

  • Configure a VPC endpoint for DynamoDB.

    Why it's wrong here

    Configuring a VPC endpoint for DynamoDB establishes a private connection between your VPC and the DynamoDB service, enhancing security by keeping traffic within the AWS network. While essential for private connectivity and compliance, a VPC endpoint is a network configuration and does not provide any authorization or decryption capabilities. It merely facilitates the secure communication channel; the permissions to access and decrypt data are still governed by IAM policies and KMS key policies.

  • Modify the Lambda function to call KMS Decrypt API.

    Why it's wrong here

    Modifying the Lambda function to directly call the KMS Decrypt API is an incorrect approach because DynamoDB's server-side encryption with KMS is a fully managed feature. When a Lambda function, with the appropriate IAM and KMS key permissions, requests encrypted data from DynamoDB, the DynamoDB service automatically handles the decryption process on the function's behalf. Direct decryption calls from the application layer are unnecessary, introduce complexity, and bypass the integrated, secure workflow provided by AWS services.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 20, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.