AWS Certified Developer - Associate · Domain 1 · 32% of exam

Development with AWS Services

Drill 20 practice questions focused entirely on Development with AWS Services for the AWS DVA-C02 exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.

Verified answer20 questions
Question 1 of 20

A developer exposes a REST API through Amazon API Gateway that forwards requests to a Lambda function. The Lambda code is being invoked with malformed JSON bodies and missing required query parameters, wasting compute and generating errors. The team wants to reject these bad requests before they reach Lambda, without adding custom validation code. What is the MOST appropriate approach?

Reviewed for accuracy · Report an issue
Question 2 of 20

A developer maintains a monolithic web application backed by an Amazon Aurora MySQL cluster with a single writer instance. Product teams now run heavy read-only reporting queries during business hours, and these queries are causing latency spikes for the transactional traffic on the primary. The reporting queries can tolerate data that is a few seconds stale. What is the MOST cost-effective way to offload the reporting workload while keeping application code changes minimal?

Reviewed for accuracy · Report an issue
Question 3 of 20

A developer writes a Lambda function that loads 200 records into a DynamoDB table using a series of BatchWriteItem calls (25 items each). During peak load, some responses return successfully but the function later discovers that not all records were actually written. Reviewing the SDK response reveals a non-empty UnprocessedItems map. What is the correct way to ensure all records are eventually persisted?

Reviewed for accuracy · Report an issue
Question 4 of 20

A developer is designing a DynamoDB table for an IoT application that stores sensor readings. Each device sends multiple readings per day, and the most common access pattern is: 'Retrieve all readings for a specific device within a given time range.' The application must support this query efficiently without scanning the entire table. How should the developer design the table's primary key?

Reviewed for accuracy · Report an issue
Question 5 of 20

A developer is building a user-registration microservice that stores user profiles in a DynamoDB table with 'userId' as the partition key. During registration, the service must create a new item only if a profile with the same userId does not already exist; if one exists, the operation must fail without overwriting the existing data. Which approach implements this requirement most efficiently?

Reviewed for accuracy · Report an issue
Question 6 of 20

A gaming leaderboard application stores player statistics in an Amazon DynamoDB table. The read-heavy workload performs the same key-based item lookups repeatedly, and users are complaining about single-digit millisecond latency that the team wants to reduce to microseconds. The reads are eventually consistent and item values change infrequently. Which change requires the least application code effort to meet the latency goal?

Reviewed for accuracy · Report an issue
Question 7 of 20

A developer is building an order-tracking service backed by a DynamoDB table named Orders. The table uses OrderId as the partition key. A new requirement asks the application to efficiently retrieve all orders belonging to a specific CustomerId, and CustomerId is not part of the table's primary key. The team wants to avoid full table scans and minimize query latency. What is the MOST appropriate way to support this access pattern?

Reviewed for accuracy · Report an issue
Question 8 of 20

A developer is designing a DynamoDB table for a customer support ticketing system. The table uses 'customerId' as the partition key and 'ticketId' as the sort key. Support agents frequently query all tickets for a customer sorted by 'lastUpdatedTimestamp', and these reads must always return the most recent write to guarantee agents never act on stale ticket status. Which approach satisfies this requirement?

Reviewed for accuracy · Report an issue
Question 9 of 20

A developer is building a new social media application backend using Amazon DynamoDB. The application is expected to launch with unknown traffic patterns that could spike unpredictably from a few requests per second to tens of thousands during viral events. The team wants to avoid throttling during spikes and does not want to spend time forecasting capacity or managing scaling policies. Which DynamoDB capacity configuration best meets these requirements?

Reviewed for accuracy · Report an issue
Question 10 of 20

A retail application stores each order as an item in a DynamoDB table. The team wants a Lambda function to update a running total of daily sales in a separate aggregation table every time a new order is inserted. The function needs access to the full attribute values of each newly created order item. Which configuration correctly delivers this data to the Lambda function?

Reviewed for accuracy · Report an issue
Question 11 of 20

A developer is building an online banking feature that transfers funds between two accounts stored as separate items in a single DynamoDB table. Both the debit on the source account item and the credit on the destination account item must either both succeed or both fail, with no partial updates visible to other readers. Which approach should the developer use?

Reviewed for accuracy · Report an issue
Question 12 of 20

A developer is building a web application that stores user session tokens in a DynamoDB table. Each session should automatically be removed 24 hours after creation to reduce storage costs and keep the table clean. The developer wants a solution that requires minimal ongoing operational effort and no scheduled cleanup jobs. Which approach should the developer implement?

Reviewed for accuracy · Report an issue
Question 13 of 20

A developer is designing a DynamoDB table that ingests high-volume IoT sensor readings. All devices report using the same 'metric-type' value (temperature), which the team initially chose as the partition key. During load tests, they observe severe write throttling on a single partition even though total provisioned write capacity is far from being fully consumed. Which change to the table design will best distribute the write load?

Reviewed for accuracy · Report an issue
Question 14 of 20

A developer builds a DynamoDB table for an IoT platform that ingests telemetry from thousands of sensors. The table uses 'deviceType' as the partition key and a timestamp as the sort key. Only three device types exist. During load testing, the application experiences frequent ProvisionedThroughputExceededException errors even though total consumed capacity is far below the provisioned capacity. What is the MOST likely cause and the best remediation?

Reviewed for accuracy · Report an issue
Question 15 of 20

A developer is building a product catalog service backed by an Amazon RDS MySQL database. Read traffic is very high and heavily skewed toward a small set of popular products, causing elevated database CPU. The team adds an Amazon ElastiCache for Redis cluster and wants a caching strategy where data is loaded into the cache only when it is first requested, minimizing memory used for products that are never read. How should the developer implement the read path?

Reviewed for accuracy · Report an issue
Question 16 of 20

A developer is building an order-processing system with several independent microservices (payment, inventory, shipping). Each service must react to events without any central controller directing the flow. When an order is placed, the payment service emits an event that the inventory service consumes, which in turn emits an event the shipping service consumes. The team wants loosely coupled services that each own their own logic and can be added or removed without changing a central component. Which architectural pattern does this design represent?

Reviewed for accuracy · Report an issue
Question 17 of 20

A media company ingests clickstream events into a single Amazon Kinesis Data Stream. Two independent teams need to process every record in near real time: one team runs analytics aggregation, and the other performs fraud detection. Currently both teams' Lambda consumers share the stream, and as they add more consumers the per-consumer read latency keeps increasing because they compete for the shard's 2 MB/second read throughput. Which approach best resolves the throughput contention while keeping both consumers reading all records?

Reviewed for accuracy · Report an issue
Question 18 of 20

A developer is building a real-time analytics platform that reads from a single Amazon Kinesis Data Stream. Currently three separate Lambda consumer applications read from the same stream using standard (shared-throughput) consumers, and the team is seeing increased read latency and GetRecords throttling as more consumers are added. The team wants each consumer to receive records with sub-200ms latency and its own dedicated read throughput without provisioning additional shards. What should the developer do?

Reviewed for accuracy · Report an issue
Question 19 of 20

A developer builds a REST API using API Gateway with a Lambda proxy integration (AWS_PROXY). When the Lambda function encounters a validation error, the developer wants API Gateway to return an HTTP 400 status with a custom JSON error body to the client. Currently, all responses—including handled errors—return HTTP 200. What is the correct way to make the function return a 400 status to the client?

Reviewed for accuracy · Report an issue
Question 20 of 20

A developer configures an S3 bucket to invoke a Lambda function asynchronously when new objects are uploaded. Occasionally the function fails to process an object even after all automatic retries are exhausted, and those failed events are silently lost. The developer needs to capture the details of these permanently failed asynchronous invocations for later inspection and reprocessing, with minimal code changes. What is the MOST appropriate solution?

Reviewed for accuracy · Report an issue

More DVA-C02 practice

Keep going with the other AWS Certified Developer - Associate domains, or take a full timed mock exam.

← Back to DVA-C02 overview