All AWS exams
Free DVA-C03 practice test: 30 questions with answers
30 original questions for AWS Certified Developer - Associate (updated), drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 100 questions
All 30 DVA-C03 questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Development with AWS Services (8 questions)
Question 1
A Lambda function consumes messages from an Amazon SQS queue, and some messages fail repeatedly. The team wants the failed messages set aside for inspection without blocking the main queue. What should it configure?
- AUse SNS fan-out so the queue receives copies of published messages
- BEnable provisioned concurrency on the function alias for warm starts
- CA dead-letter queue (redrive policy) on the source queue
- DIncrease the function timeout to 900 seconds for longer batch runs
Show answer and explanationHide answer
Correct answer: CA dead-letter queue receives messages that exceed the configured receive count, so the main queue keeps flowing and the failures can be examined later. Timeouts and concurrency do not isolate failing messages, and SNS fan-out is a publishing pattern.
Question 2
Which operation most efficiently returns all orders for one customer sorted by order date, when the table's partition key is customerId and its sort key is orderDate?
- AQuery using customerId as the partition key, which returns items in sort-key order
- BScan the whole table with a filter expression on customerId and sort the matches by orderDate
- CBatchGetItem with a key list of every order ID, fetched in parallel
- DCreate a global secondary index on the status attribute for order lookups
Show answer and explanationHide answer
Correct answer: AA Query on the partition key reads only that customer's items, and results come back in sort-key order. A Scan reads the whole table, BatchGetItem needs every key in advance, and a status index does not match the access pattern.
Question 3
A REST API must reject malformed request bodies before invoking Lambda, to reduce invocation cost. Which feature should be configured?
- AA usage plan with quotas and throttling limits attached to API keys
- BResponse caching on the stage with a 300 second TTL
- CRequest validation on the API method with a JSON schema model
- DA WAF rule for SQL injection patterns in query strings and request body
Show answer and explanationHide answer
Correct answer: CRequest validation in API Gateway checks the body against a model and returns an error before the backend runs. Caching, usage plans, and WAF rules do not validate request structure.
Question 4
A latency-sensitive Lambda function shows frequent cold starts. Which feature keeps initialized execution environments ready?
- AReserved concurrency
- BProvisioned concurrency
- CA dead-letter queue
- DIncreasing the function timeout
Show answer and explanationHide answer
Correct answer: BProvisioned concurrency keeps a set number of environments initialized so requests avoid cold starts. Reserved concurrency only caps how many run, and timeouts and dead-letter queues do not affect initialization.
Question 5
An application writes an item to DynamoDB and immediately reads it back, and it must see the latest value. Which read option is required?
- AStrongly consistent read
- BScan with a projection expression
- CBatchGetItem without consistency settings
- DEventually consistent read
Show answer and explanationHide answer
Correct answer: AA strongly consistent read returns the most recent write, while eventually consistent reads may briefly return older data. Scans and batch reads are retrieval methods, not consistency guarantees.
Question 6
Several services must each receive every order event, and each service must buffer events independently. Which pattern fits best?
- AOne shared SQS queue polled by every consumer group
- BWrite events to an S3 bucket and let consumers read them
- CEach producer invokes every consumer directly over HTTP
- DAn SNS topic with an SQS queue subscribed for each consumer
Show answer and explanationHide answer
Correct answer: DSNS fan-out delivers each event to every subscribed queue, and each queue buffers independently for its consumer. A shared queue lets consumers compete for messages, so each event is handled only once.
Question 7
A workflow must pause until a person approves a request, which may take several days. Which Step Functions pattern supports this?
- APolling a DynamoDB table inside a Lambda loop
- BWait for callback with a task token
- CAn Express workflow with a one-second timeout
- DA Standard workflow with no wait state
Show answer and explanationHide answer
Correct answer: BWait for callback pauses the execution until the approval system returns the task token with a result. Polling wastes invocations, and Express workflows are designed for short executions.
Question 8
A read-heavy application repeatedly fetches the same hot DynamoDB items and needs microsecond read latency. Which service adds an in-memory cache in front of the table?
- AAmazon Redshift Data Sharing
- BAmazon Athena Query Federation
- CAmazon EFS Intelligent-Tiering
- DAmazon DynamoDB Accelerator (DAX)
Show answer and explanationHide answer
Correct answer: DDAX is a managed in-memory cache for DynamoDB that returns cached reads with microsecond latency, and it keeps the same API. Redshift, Athena, and EFS do not cache DynamoDB reads.
Deployment (8 questions)
Question 9
A team wants to run containers without managing servers or cluster hosts. Which service fits best?
- AAmazon ECS on AWS Fargate
- BAmazon Athena serverless SQL
- CAmazon RDS for MySQL
- DAWS Snow Family Snowball
Show answer and explanationHide answer
Correct answer: AFargate runs container tasks without the team managing EC2 instances, while ECS handles scheduling. Athena, RDS, and Snowball do not run application containers.
Question 10
A team wants to automate rolling and blue/green deployments of application code to a fleet of EC2 instances. Which service fits best?
- AAWS CodeDeploy
- BAWS Glue ETL
- CAmazon Macie
- DAWS Budgets
Show answer and explanationHide answer
Correct answer: ACodeDeploy automates application deployments to EC2, on-premises servers, Lambda, and ECS, with rolling and blue/green strategies. Glue is for data integration, Macie for sensitive data discovery, and Budgets for cost tracking.
Question 11
Which AWS service orchestrates the stages of a CI/CD release, such as source, build, test, and deploy?
- AKinesis Firehose
- BAWS CodePipeline
- CAWS Backup Plan
- DAmazon Route 53
Show answer and explanationHide answer
Correct answer: BCodePipeline models the release process as stages and actions and calls CodeBuild and CodeDeploy as needed. Kinesis handles streaming data, Backup protects data, and Route 53 provides DNS.
Question 12
A CloudFormation stack update fails partway through. What is the default behaviour?
- AThe stack deletes all of its resources without warning
- BThe stack waits until someone performs a manual rollback every time
- CThe stack stays in an unrecoverable state
- DThe stack rolls back to the previous stable state
Show answer and explanationHide answer
Correct answer: DBy default CloudFormation rolls the stack back to its last stable state when an operation fails, unless rollback is disabled. Deleting everything or leaving the stack unrecoverable are not the defaults.
Question 13
A Lambda function must be released gradually, with automatic rollback if a CloudWatch alarm fires. Which approach achieves this?
- AA CodeDeploy canary deployment configuration with alarm-based rollback
- BDelete the function and recreate it with the new code and its event triggers
- CDeploy the new version to 100 percent of traffic immediately
- DA manual console update of the function code followed by a manual check of the alias
Show answer and explanationHide answer
Correct answer: ACodeDeploy supports Lambda traffic shifting with canary or linear configurations and can roll back automatically when linked alarms go into alarm state. The other options have no automated traffic shift or rollback.
Question 14
Which AWS-native service defines infrastructure as declarative templates that create and update stacks of resources?
- AAmazon Athena Queries
- BAWS CloudFormation
- CAWS Budgets API
- DAmazon QuickSight
Show answer and explanationHide answer
Correct answer: BCloudFormation provisions and manages resources from declarative templates as stacks. Athena queries data, Budgets tracks spend, and QuickSight builds dashboards.
Question 15
A team needs a managed registry to store and version its container images for deployment to ECS. Which service should it use?
- AAmazon Elastic Container Registry (ECR)
- BAmazon S3 Glacier Deep Archive vaults
- CAmazon EBS gp3 volume snapshots
- DAmazon Lightsail virtual servers
Show answer and explanationHide answer
Correct answer: AAmazon ECR stores container images with versioning and access control, and ECS and EKS pull images from it. S3 Glacier is archival storage, EBS is block storage, and Lightsail is a simple hosting service.
Question 16
Which file defines the build commands that AWS CodeBuild runs for a project?
- Aappspec.yml
- Bpom.xml
- Cbuildspec.yml
- DA Dockerfile used only by Lambda
Show answer and explanationHide answer
Correct answer: CThe buildspec file lists the install, pre-build, build, and post-build commands for CodeBuild. The appspec file belongs to CodeDeploy, and pom.xml is a Maven build definition.
Troubleshooting and Optimization (7 questions)
Question 17
A developer needs to trace one request across API Gateway, Lambda, and DynamoDB to find the slowest segment. Which service provides this?
- AAWS Config
- BAWS Budgets
- CAWS X-Ray
- DAmazon Macie
Show answer and explanationHide answer
Correct answer: CAWS X-Ray collects traces and service maps so the latency of each segment can be seen. Config, Budgets, and Macie address configuration, cost, and data discovery respectively.
Question 18
A developer must find error messages across several Lambda log groups in the last hour. Which tool is designed for this?
- AS3 Select queries one object
- BCloudWatch Logs Insights
- CAmazon Macie findings
- DAWS Config resource timeline
Show answer and explanationHide answer
Correct answer: BCloudWatch Logs Insights runs queries across one or more log groups to find and aggregate matching entries. S3 Select queries objects, not log groups, and Macie and Config do not search logs.
Question 19
A Lambda function returns throttling errors when many invocations arrive at once, and one function is starving the others in the account. Which setting limits this?
- AReserved concurrency
- BThe timeout setting
- CThe memory setting
- DThe log retention period
Show answer and explanationHide answer
Correct answer: AReserved concurrency caps the maximum concurrent executions for one function and guarantees it capacity from the account pool. Memory, timeout, and log retention do not control how many executions run at once.
Question 20
A Lambda function times out intermittently when calling an external API. Which metrics should the developer check first in CloudWatch?
- ATable item count and consumed capacity
- BBucket size and number of objects in the bucket
- CInstance CPU credit balance and EBS burst throughput
- DDuration and Errors metrics for the function
Show answer and explanationHide answer
Correct answer: DDuration and Errors show how long invocations run and how often they fail, which pinpoints timeouts. The other metrics belong to databases, storage, or EC2 instances that this function does not use.
Question 21
A team needs to find which API call caused an AccessDenied error for an IAM role last night. Which service records this history?
- AAWS Trusted Advisor
- BAmazon Inspector
- CAmazon Polly
- DAWS CloudTrail
Show answer and explanationHide answer
Correct answer: DCloudTrail records management and, when enabled, data API calls with the caller identity, so the failing call can be identified. Polly, Inspector, and Trusted Advisor do not record API history.
Question 22
A DynamoDB table shows throttling on a few partitions while overall capacity is unused. What is the most likely fix?
- AChoose a higher-cardinality partition key to spread requests across partitions
- BIncrease the instance size of the application servers behind the load balancer
- CAdd more memory to the Lambda functions that read the table and raise the function timeout
- DDisable retries in the SDK and set the client to fail fast on the first throttled response
Show answer and explanationHide answer
Correct answer: AHot partitions come from requests concentrating on a few partition key values, so a key with more distinct values spreads the load. Application instance size, Lambda memory, and retries do not change how DynamoDB distributes items.
Question 23
Which two steps help diagnose a Lambda function that fails intermittently? (Choose two.)
- AEnable AWS X-Ray tracing
- BTurn off logging to reduce cost
- CReview CloudWatch Logs for error stack traces
- DIncrease the size of the code package
- EDelete the function's log group
Show answer and explanationHide answer
Correct answer: A, CX-Ray shows where time and errors occur across the request path, and CloudWatch Logs contain the stack traces for failures. Disabling or deleting logs removes the evidence, and a larger package does not diagnose intermittent failures.
Security (7 questions)
Question 24
Mobile users sign in with a social identity and must receive temporary AWS credentials to access an S3 prefix. Which service should be used?
- AA shared IAM user for every app user with long-lived access keys stored in the app bundle
- BRoot account keys in the app, used to sign S3 requests for each user session at runtime
- CHard-coded access keys committed in the source code and rotated manually each year by the team
- DAn Amazon Cognito identity pool that exchanges tokens for temporary credentials
Show answer and explanationHide answer
Correct answer: DA Cognito identity pool exchanges identity-provider tokens for scoped, temporary AWS credentials. Shared users, root keys, and hard-coded keys are long-lived and unsafe.
Question 25
A Lambda function needs to read objects under one S3 prefix. Which permission approach is correct?
- AAttach the AdministratorAccess managed policy
- BGrant s3:* with Resource set to * for the whole account
- CGrant s3:GetObject on the ARN of that prefix only
- DUse the root account's long-lived access keys
Show answer and explanationHide answer
Correct answer: CLeast privilege means granting only the action needed on the specific resource. Administrator, wildcard, and root access each grant far more than a read of one prefix requires.
Question 26
Which service stores database credentials and can rotate them automatically on a schedule?
- APlain-text Lambda environment variables
- BAmazon S3 with versioning enabled
- CAWS Secrets Manager
- DAWS CloudTrail
Show answer and explanationHide answer
Correct answer: CSecrets Manager stores secrets encrypted with KMS, controls access with IAM, and supports managed rotation for supported databases. S3 versioning, plain-text variables, and CloudTrail do not manage credential rotation.
Question 27
An application on an EC2 instance needs to call Amazon S3. Which credential approach is recommended?
- AAccess keys hardcoded in the app and baked into the AMI
- BAn instance profile role attached to the instance
- CA shared IAM user holding long-lived keys
- DThe root account's access keys, kept in a local file
Show answer and explanationHide answer
Correct answer: BAn instance profile supplies temporary credentials through the instance metadata service, so no long-lived keys are stored on the machine. Keys in AMIs, root keys, and shared users are long-lived and widely exposed.
Question 28
A company must encrypt S3 objects with a key it controls, and it needs an audit trail of key usage. Which option meets this?
- ASSE-KMS with a customer managed key
- BSSE-S3 only
- CNo encryption, relying on bucket privacy
- DClient-side encryption with a password stored in code
Show answer and explanationHide answer
Correct answer: ASSE-KMS with a customer managed key lets the company control key policies and rotation, and KMS logs key usage in CloudTrail. SSE-S3 uses keys that AWS manages, and storing passwords in code is unsafe.
Question 29
Which policy controls which principals may invoke a specific Lambda function, including principals in other accounts?
- AA security group on the function's VPC
- BA route table entry with a default target
- CA network ACL with an allow rule for HTTPS
- DA resource-based policy on the Lambda function
Show answer and explanationHide answer
Correct answer: DA resource-based policy on the function grants invoke permission to specific principals, including cross-account ones. Security groups, NACLs, and route tables control network traffic, not IAM authorization to invoke.
Question 30
An API must accept only requests carrying a valid JWT issued by an Amazon Cognito user pool. What should be configured?
- ABasic authentication with a shared password on the method
- BAn IP allow list on the API Gateway resource policy only
- CA Cognito user pool authorizer on the API method
- DA usage plan with a monthly request quota
Show answer and explanationHide answer
Correct answer: CA Cognito user pool authorizer validates the token on each request before the integration runs. IP lists, shared passwords, and usage plans do not verify user identity tokens.