Question 1,432 of 724
DVA-C02 Security Practice Question
A developer is creating an IAM policy to allow a Lambda function to write logs to CloudWatch. Which policy should be attached to the Lambda execution role?
⚠ Common exam trap
The trap here is that candidates may mistakenly choose a broad policy like AdministratorAccess or a service-specific policy like AmazonDynamoDBFullAccess, thinking they need to grant 'full' permissions or that the Lambda function might need access to other services, when the question specifically asks only for CloudWatch logging permissions.
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
✓
AWSLambdaBasicExecutionRole
The AWSLambdaBasicExecutionRole managed policy grants permissions for Lambda to write logs to CloudWatch Logs, specifically allowing the logs:CreateLogGroup, logs:CreateLogStream, and logs:PutLogEvents actions. This is the minimal set of permissions required for a Lambda function to send execution logs to CloudWatch, making it the correct choice for this use case.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
AWSLambdaBasicExecutionRole
Why this is correct
The AWSLambdaBasicExecutionRole is an AWS managed policy specifically designed to grant a Lambda function the essential permissions required for its operation. This includes the ability to create log groups and log streams in Amazon CloudWatch Logs, and to put log events into those streams. These permissions are fundamental for monitoring function execution, debugging, and ensuring operational visibility, making it the correct and least-privileged choice for basic Lambda functionality.
- ✗
AdministratorAccess
Why it's wrong here
The AdministratorAccess managed policy provides unrestricted access to nearly all AWS services and resources. While it would technically allow a Lambda function to perform any action, including logging, it represents a severe violation of the principle of least privilege. Granting such broad permissions to a function that only requires basic execution and logging capabilities introduces significant security vulnerabilities and is highly discouraged in production environments.
- ✗
AmazonDynamoDBFullAccess
Why it's wrong here
The AmazonDynamoDBFullAccess managed policy grants full administrative permissions to interact with Amazon DynamoDB tables and related resources. This policy is entirely focused on DynamoDB operations and does not include any permissions necessary for a Lambda function to execute its code or to send its operational logs to Amazon CloudWatch Logs. Therefore, it is irrelevant for establishing the basic execution environment of a Lambda function.
- ✗
AmazonS3FullAccess
Why it's wrong here
The AmazonS3FullAccess managed policy provides comprehensive permissions to perform all actions on Amazon S3 buckets and objects, including creating, deleting, and modifying data. This policy is exclusively for S3 interactions and does not contain any of the required permissions for a Lambda function to execute its runtime or to publish its diagnostic logs to Amazon CloudWatch Logs. Consequently, it fails to address the fundamental execution and logging needs of a Lambda function.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, 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 →
Last reviewed: Jun 24, 2026
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.
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.
Sign in to join the discussion.