PassSpark

AWS Certification Developer Associate 2023 past questions and answers

This 2023 AWS Certification Developer Associate set has 20 practice questions. Try these 5 free sample questions, tap a question to reveal the answer and explanation. Then practise the whole 2023 set with instant marking.

Practise the full 2023 setTimed exam mode

Sample AWS Certification Developer Associate 2023 questions

1. An online store uses a Lambda function to reserve inventory in DynamoDB when an order is submitted. Two customers can attempt to buy the last unit at nearly the same time. Which approach prevents the inventory count from becoming negative with the least application-level coordination?
  1. Use UpdateItem with a condition expression that the available quantity is at least the requested quantity, and decrement it atomically.
  2. Read the quantity, subtract the order quantity in the Lambda function, and write the result with PutItem.
  3. Cache the quantity in each Lambda execution environment and update the cache after each reservation.
  4. Set the Lambda function's reserved concurrency to one so requests are processed serially across the application.

Answer: A. Use UpdateItem with a condition expression that the available quantity is at least the requested quantity, and decrement it atomically.

DynamoDB evaluates a condition and applies the update atomically, so only a reservation that still satisfies the quantity condition succeeds. A separate read followed by a write can race, and limiting Lambda concurrency is costly and does not provide a robust data-level guarantee.

2. A ticketing application sends work to an Amazon SQS FIFO queue. Events for each customer must be processed in order, but events for different customers should be processed concurrently. What should the producer use for each message's MessageGroupId?
  1. A single constant value for all messages, so that SQS can preserve ordering globally.
  2. The customer identifier, so messages for one customer share a group and different customers can use separate groups.
  3. A new random value for every message, so all messages can be processed concurrently.
  4. The message body hash as the MessageDeduplicationId, leaving MessageGroupId empty.

Answer: B. The customer identifier, so messages for one customer share a group and different customers can use separate groups.

A FIFO queue preserves order within a message group and can process different groups concurrently, making the customer identifier the appropriate group key. One group serializes all work, while a distinct group for every message removes the required per-customer ordering.

3. A team is implementing an order workflow that calls several Lambda functions, waits for an external approval, and must retry a transient failure before sending a failure notification. Which service provides the most direct managed orchestration for this workflow?
  1. Amazon EventBridge Scheduler, with a separate schedule for each workflow step.
  2. Amazon SQS, by placing each step's input on a different queue and polling all queues from one function.
  3. AWS Step Functions, using task states, a wait state, and retry/catch transitions.
  4. Amazon CloudWatch Logs, by configuring metric filters to invoke each next step.

Answer: C. AWS Step Functions, using task states, a wait state, and retry/catch transitions.

Step Functions models multi-step state, waits, and error handling directly, reducing custom orchestration code. SQS is a useful messaging service but does not itself manage workflow state transitions or approval waits.

4. A mobile client reads a DynamoDB item containing a version number, lets a user edit it, and then submits the change. The application must reject an update if another user changed the item after it was read. Which write pattern should the API use?
  1. Write the updated item unconditionally and rely on DynamoDB's eventual consistency to resolve conflicts.
  2. Write to a global secondary index instead of the base table.
  3. Use a strongly consistent read and then perform an unconditional write.
  4. Use UpdateItem with a condition expression requiring the stored version to equal the version originally read, and increment the version.

Answer: D. Use UpdateItem with a condition expression requiring the stored version to equal the version originally read, and increment the version.

A conditional update implements optimistic locking: the write succeeds only if the version has not changed, and the version increment prevents stale clients from overwriting newer data. A strongly consistent read alone cannot prevent another write between the read and update.

5. A product-catalog API served by API Gateway and Lambda receives many identical read requests. Catalog changes only every few minutes, and the responses are not personalized. Which change is most cost-effective while keeping the data reasonably current?
  1. Enable API Gateway stage caching with a short TTL appropriate to the catalog's update interval.
  2. Increase the Lambda function's reserved concurrency to the maximum account quota.
  3. Write each response to a new DynamoDB item and query that item for every request.
  4. Add a NAT gateway so API Gateway can cache responses outside the VPC.

Answer: A. Enable API Gateway stage caching with a short TTL appropriate to the catalog's update interval.

API Gateway caching can serve repeated read responses for a configured TTL, reducing backend invocations and database reads while limiting staleness. More concurrency does not cache results, and a NAT gateway is unrelated to API Gateway response caching.

More AWS Certification Developer Associate years

2026202520242022

All AWS Certification Developer Associate years · AWS Certification subjects

PassSpark questions are original practice questions written to each exam's syllabus and format, in the style of past questions. They are not official past papers and are not affiliated with JAMB, WAEC, NECO, any university or any exam body.