Amazon Web Services

AWS Certified Developer – Associate (DVA-C02) practice questions

8 sample questions from our 316-question Developer – Associate bank — one from each official domain, with the answer and a full explanation under each. Every question is original, written against the published exam objectives, and quality-checked before it reaches you.

DVA-C02AssociateIntermediate

Question 1 · Deployment

MiraTech is deploying a new microservices-based app on AWS. The dev team wants to minimize server management overhead and scale automatically based on API request volume. Given this situation, which AWS service should they choose to implement the backend logic with minimal infrastructure management?

  1. A.AWS Elastic Beanstalk running Node.js
  2. B.AWS Lambda functions triggered by API Gateway
  3. C.Amazon EC2 Auto Scaling group with Docker containers
  4. D.An Amazon ECS cluster with Fargate launch type
Show answer & explanation

Answer: B

AWS Lambda offers a fully managed serverless compute environment that scales automatically with the number of requests and requires no server provisioning. While ECS on Fargate and Elastic Beanstalk also reduce infrastructure management, Lambda is better suited for event-driven APIs with seamless scaling. EC2 Auto Scaling involves managing servers directly, which contradicts the goal to minimize server management overhead.

Question 2 · Security

LumaToys stores user data in DynamoDB and wants to ensure that only application servers with a specific IAM role can write data during business hours (9 AM–5 PM UTC). Which AWS feature should a developer implement to enforce this policy automatically?

  1. A.Use an IAM policy with a condition key limiting access based on the current time
  2. B.Configure a DynamoDB table-level access policy with AWS Config rules
  3. C.Attach a Lambda function that triggers on writes and rejects requests outside of business hours
  4. D.Set up VPC endpoint policies restricting access based on source IP addresses
Show answer & explanation

Answer: A

IAM policies support condition keys like aws:CurrentTime, enabling time-based access control directly without custom code. Lambda triggers cannot easily reject writes before they happen, and VPC endpoint policies restrict network-level access, not time. AWS Config is for compliance monitoring but does not enforce real-time access controls.

Question 3 · AWS SDKs

GameGrid is developing a new leaderboard feature using AWS SDK for JavaScript v3. Their backend code frequently calls multiple AWS services including DynamoDB and SNS. To improve response times, what practice should the developer adopt when initializing AWS service clients?

  1. A.Create one client instance per API request and pass it to all service calls
  2. B.Reuse a single client instance for each AWS service throughout the application
  3. C.Instantiate new clients inside each function that makes AWS calls
  4. D.Use AWS SDK v2 instead as it manages client instances automatically
Show answer & explanation

Answer: B

Reusing client instances reduces overhead like connection setup and improves performance. Instantiating clients repeatedly leads to unnecessary overhead. AWS SDK v3 encourages client reuse and modular imports, so using v2 is unnecessary and not recommended solely for client management.

Question 4 · AWS Lambda

In the context of AWS Lambda, a developer at Finova notices that some function invocations timeout unpredictably when processing large JSON payloads from API Gateway. Given that the function has sufficient memory allocated, what is the most likely cause and best next step to troubleshoot?

  1. A.The Lambda function’s code has an infinite loop; the developer should review the code logic
  2. B.The IAM role lacks permissions to read the JSON payload, causing timeout
  3. C.API Gateway payload size exceeds Lambda limits; reduce payload size or use S3 for large data
  4. D.Lambda concurrency limits are reached; increase reserved concurrency
Show answer & explanation

Answer: C

Lambda supports payloads up to 6 MB (synchronous). Larger JSON payloads from API Gateway may exceed this limit, causing invocation failure or timeout. The best approach is to reduce payload size or offload large data to S3, then pass references. Infinite loops or IAM permission issues would cause errors but not specifically timeout on large inputs.

Question 5 · Refactoring

NexGen Media is migrating a monolithic application to AWS and wants to refactor it into smaller components that can scale independently. Which AWS service is most suitable for hosting containerized microservices with minimal cluster management?

  1. A.Amazon EC2 with Kubernetes installed manually
  2. B.AWS Elastic Beanstalk with multi-container Docker support
  3. C.AWS Lambda for all microservices
  4. D.Amazon ECS using Fargate launch type
Show answer & explanation

Answer: D

Amazon ECS Fargate allows running containers without provisioning or managing servers, ideal for microservices requiring independent scaling. EC2 with Kubernetes needs significant management effort. Elastic Beanstalk supports containers but offers less granular control for microservices. Lambda is serverless but may not suit all microservice workloads, especially long-running processes.

Question 6 · Monitoring and Troubleshooting

DigiMart's development team is debugging an AWS Lambda function that processes Kinesis stream events. They want to capture detailed error information and monitor invocation performance without modifying the function code. Which AWS service should they enable to achieve this?

  1. A.AWS X-Ray tracing enabled for the Lambda function
  2. B.Enable S3 access logging on the Lambda execution role
  3. C.Amazon CloudWatch Logs with enhanced monitoring enabled on the Kinesis stream
  4. D.Use CloudTrail to capture Lambda invocation calls
Show answer & explanation

Answer: A

AWS X-Ray provides detailed tracing of Lambda executions including performance metrics and error details automatically, without code changes if configured. CloudWatch Logs collects logs but does not trace execution flow or performance natively. S3 access logging is unrelated to Lambda, and CloudTrail logs API calls but does not provide detailed function invocation insights.

Question 7 · Development with AWS Services

The development team at BrightReach wants to automatically rotate AWS Secrets Manager credentials used by their Lambda functions every 30 days. What is the most efficient way to ensure Lambda always uses the latest credentials?

  1. A.Configure Lambda to retrieve secrets at runtime directly from Secrets Manager using the SDK
  2. B.Use AWS Systems Manager Parameter Store to store credentials instead of Secrets Manager
  3. C.Create an EventBridge rule to trigger Lambda code updates after each rotation
  4. D.Manually update environment variables in the Lambda function after each rotation
Show answer & explanation

Answer: A

Retrieving secrets at runtime directly from AWS Secrets Manager via the SDK ensures Lambda always uses current credentials without redeploying or manual updates. Storing in Parameter Store is an alternative but does not provide built-in rotation. Manually updating environment variables or triggering code updates adds operational overhead and risk of stale secrets.

Question 8 · Deployment

At DataPulse Inc., developers want to build a CI/CD pipeline that automatically deploys updated AWS Lambda functions when code is pushed to a GitHub repository. Which AWS service combination enables the cleanest integration of code commits triggering Lambda deployments?

  1. A.AWS CloudFormation with CloudTrail events on GitHub commits
  2. B.Amazon EventBridge receiving GitHub webhook events that invoke Lambda update scripts
  3. C.AWS Elastic Beanstalk linked to GitHub for Lambda deployments
  4. D.AWS CodePipeline with GitHub source and AWS CodeDeploy deployment actions
Show answer & explanation

Answer: D

AWS CodePipeline natively integrates with GitHub as a source provider and supports AWS CodeDeploy for deploying Lambda versions. This provides a managed, end-to-end CI/CD solution. CloudFormation and CloudTrail do not directly monitor GitHub commits, and Elastic Beanstalk does not deploy Lambda functions. EventBridge can process webhooks but requires more custom handling compared to CodePipeline.

308+ more questions, free

Full-length, timed or practice mode, weighted to the official blueprint — with per-domain scoring so you know exactly where you stand.

Start the full practice exam →

All questions are original — never reproduced from the real exam — and pass automated duplicate, citation and item-writing checks before publication. See how our exams are made.

Kwizza is an independent study tool and is not affiliated with, endorsed by, or sponsored by Amazon Web Services. Amazon Web Services names, logos and certification marks are the property of their respective owners and are used here only to identify the exam described. Practice questions are original, written against the publicly published exam objectives — no real exam content is reproduced.