PassSpark

AWS Certification Developer Associate 2022 past questions and answers

This 2022 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 2022 set with instant marking.

Practise the full 2022 setTimed exam mode

Sample AWS Certification Developer Associate 2022 questions

1. A payment-processing Lambda function can receive the same event more than once because its source retries failed invocations. The function writes a payment record to DynamoDB, and duplicate records must not be created. Which approach provides an atomic idempotency check?
  1. Read the table for the event ID, then write the record only if the read returns no item.
  2. Use a conditional PutItem with attribute_not_exists on the event ID key.
  3. Disable retries on the Lambda function so each event is attempted once.
  4. Write the event to an S3 object whose name is the current timestamp.

Answer: B. Use a conditional PutItem with attribute_not_exists on the event ID key.

A conditional PutItem makes the existence check and write atomic, so only one invocation can create the item for that event ID. A separate read followed by a write has a race condition, and disabling retries can lose events rather than ensuring idempotency.

2. An API Gateway REST API invokes a Lambda function that returns the same product catalog for many users. The catalog changes only every few minutes, and reducing repeated Lambda and database work is more important than serving an update immediately. Which solution requires the least application code?
  1. Add a separate EC2 instance to cache every API response.
  2. Store a copy of the catalog in each Lambda execution environment's local memory.
  3. Add a DynamoDB write to the Lambda function for every catalog read.
  4. Enable API Gateway stage caching and configure a suitable cache TTL.

Answer: D. Enable API Gateway stage caching and configure a suitable cache TTL.

API Gateway stage caching can serve repeated responses for a configured TTL without invoking the integration on every request. Lambda-local memory is not shared reliably across execution environments and may disappear between invocations.

3. An application processes uploaded files from an S3 bucket. S3 event notifications may be delivered more than once, and the bucket has versioning enabled. Which identifier is best for making each file-version processing operation idempotent?
  1. The combination of the bucket name, object key, and S3 version ID.
  2. The Lambda execution environment ID.
  3. The current time when the Lambda function starts.
  4. The S3 bucket's total object count.

Answer: A. The combination of the bucket name, object key, and S3 version ID.

Bucket, key, and version ID uniquely identify an object version, so repeated notifications for that version can be recognized as duplicates while a later version is processed separately. A timestamp or execution environment ID changes across retries and is not a stable event identity.

4. A serverless workflow has several independent steps, each of which finishes in under 10 minutes, but the complete business process can take 40 minutes. The workflow needs managed sequencing and retries for transient errors. Which service is the best fit?
  1. A single Lambda function that sleeps between steps.
  2. An API Gateway request that remains open for the entire process.
  3. AWS Step Functions coordinating the Lambda functions.
  4. A DynamoDB table used as a substitute for workflow orchestration.

Answer: C. AWS Step Functions coordinating the Lambda functions.

Step Functions provides managed state-machine orchestration, sequencing, and retry policies while each Lambda invocation stays within its execution limit. A single Lambda cannot run for 40 minutes, and an API request should not be held open throughout a long workflow.

5. An application running on Amazon EC2 must read objects from one private S3 bucket. The developer wants to avoid storing long-term AWS access keys on the instance. What is the most secure approach?
  1. Attach an IAM role with the required S3 permissions to the EC2 instance through an instance profile.
  2. Store an IAM user's access key and secret key in a source-code file on the instance.
  3. Make the bucket public and remove all authentication from the application.
  4. Place the root account access keys in the instance user data.

Answer: A. Attach an IAM role with the required S3 permissions to the EC2 instance through an instance profile.

An instance profile supplies temporary role credentials to EC2, and the role can be restricted to the required bucket actions. Long-term user or root credentials on an instance are difficult to protect and rotate and grant unnecessary risk.

More AWS Certification Developer Associate years

2026202520242023

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.