Free AWS Certified Developer – Associate Exam Practice
Explore realistic AWS Certified Developer Associate exam questions that cover key topics like serverless design, messaging services, security best practices, deployment strategies, and troubleshooting. This lesson helps you prepare by applying AWS development principles and services through scenario-based practice, improving your confidence for the DVA-C02 certification exam.
Question 1
A developer is building a stateless REST API using AWS Lambda as the backend for Amazon API Gateway. The API must scale automatically and should not store any user session data between requests.
Which design principle best supports this requirement?
A. Use Lambda environment variables to store session state.
B. Store session data in the /tmp directory.
C. Design the API to be stateless and externalize state.
D. Enable Sticky Sessions at the API Gateway level.
Question 2
A developer needs to process messages asynchronously to decouple two microservices. Messages must be processed at least once, and ordering is not required.
Which AWS service is most appropriate?
A. Amazon SNS
B. Amazon SQS Standard
C. AWS Step Functions
D. Amazon EventBridge
Question 3
A developer is maintaining an order processing system where an Amazon SQS queue triggers an AWS Lambda function. During peak hours, the downstream legacy database used by the Lambda function frequently returns “Connection Limit Exceeded” errors, causing the Lambda function to fail. The developer must ensure that no orders are lost and that the system can recover from these transient errors without issue.
Which two actions should the developer take to improve the application’s resilience? (Select any two options.)
A. Configure Lambda reserved concurrency to match the database connection limit.
B. Configure a Dead-letter Queue (DLQ) on the SQS queue to capture failed messages.
C. Switch the API Gateway to use synchronous Lambda invocation.
D. Implement exponential backoff and jitter in the Lambda code for database connection attempts.
E. Increase the Lambda function’s memory allocation to handle higher throughput.
Question 4
A developer is writing a Python AWS Lambda function that processes records from an Amazon Kinesis Data Stream. The function must ensure idempotent writes to DynamoDB so that retries do not create duplicate items.
Which code snippet correctly implements this requirement?
A:
table.put_item(Item=item)
B:
table.put_item(Item=item,ConditionExpression="attribute_not_exists(id)")
C:
table.update_item(Key={"id": item["id"]},UpdateExpression="SET processed = :p",ExpressionAttributeValues={":p": True})
D:
table.put_item(Item=item,ReturnValues="ALL_OLD")
Question 5
A company is building a high-throughput event-driven architecture where thousands of IoT devices publish telemetry events every second. Events must be ingested, processed asynchronously, and routed to multiple downstream services. Each consumer processes data independently, and failures in one consumer must not impact others.
Which two design choices best satisfy these requirements? (Select any two options.)
A. Publish events to Amazon SNS and subscribe multiple Amazon SQS queues.
B. Publish events directly to a single Amazon SQS FIFO queue. ...