AWS Certified Developer Associate DVA-C03 Practice Questions with Explanations
Questions
A web API calls a slow report-generation service directly, and users see timeouts during busy periods. The report doesn't need to be returned in the same request. What change best fits?
- Send a message to Amazon SQS and process reports asynchronously
- Increase the API's timeout so callers wait longer for each report
- Call the report service twice in parallel and use the first answer
- Move the report service into the same Lambda function as the API
A client must get an answer immediately, such as a price quote shown on screen. Which invocation pattern fits?
- Synchronous request/response through Amazon API Gateway
- Asynchronous processing through an Amazon SQS queue
- An EventBridge rule that runs the quote job hourly
- An S3 event notification on a quote-request file that the client uploads
An app's SDK calls to DynamoDB sometimes fail with ProvisionedThroughputExceededException. What should the code do?
- Retry with exponential backoff and jitter
- Retry immediately in a tight loop until it works
- Log the error and drop the request
- Switch every read to a full table scan
A product page calls a recommendation service that sometimes fails. The page should still load. Which approach is this?
- Graceful degradation: show the page with default or cached recommendations
- Tight coupling: fail the whole page whenever recommendations are unavailable
- Vertical scaling: move the recommendation service to a larger instance type
- Synchronous retries: keep calling the service until it finally responds
Messages from an SQS standard queue are occasionally processed twice. How should the consumer be written?
- Make processing idempotent so repeating a message has no extra effect
- Assume each message arrives exactly once and add no duplicate checks in the code
- Delete the queue and recreate it whenever a duplicate appears
- Switch the consumer to poll the queue less often to avoid repeats
An API Gateway REST API must reject requests whose JSON body is missing required fields before Lambda runs. What should be configured?
- A request validator with a JSON schema model
- A Lambda authorizer that checks the request body
- A usage plan with an API key requirement
- Response caching on the API stage
A legacy backend returns XML, but clients need JSON from a REST API without changing the backend. Which API Gateway feature helps?
- Mapping templates
- Stage variables that point to a new backend
- Lambda proxy integration with no code changes
- Usage plans with throttling limits per client
A developer wants code to call S3 without writing raw HTTP requests or handling request signing. What should be used?
- An AWS SDK
- The AWS Management Console
- AWS CloudShell scripts only
- A hand-built HTTPS client with no signing
A Lambda function reads records from Kinesis Data Streams. In what form does the record data arrive in the event?
- Base64-encoded, so the code must decode it before parsing
- Plain JSON objects that are always ready to use directly
- XML documents that must be converted with a mapping template
- Binary files stored in S3 that the function must download
Clickstream events must be ingested in real time, keep their order per user, and be read by several consumer applications. Which service fits?
- Amazon Kinesis Data Streams with the user ID as the partition key
- Amazon SNS with an email subscription for each of the consumer applications
- An SQS standard queue shared by every consumer
- Amazon S3 with a lifecycle rule on the upload prefix
Streaming data must be delivered to S3 in batches with no consumer code to write or manage. Which service fits?
- Amazon Data Firehose
- Amazon Kinesis Data Streams with custom consumers
- Amazon SQS FIFO queue
- AWS Step Functions
When a file is uploaded to an S3 bucket, a function must process it. Which event-driven pattern is simplest?
- An S3 Event Notification that invokes a Lambda function
- A cron job on an EC2 instance that lists the bucket's new objects every minute
- A CloudFormation stack update after each upload
- An SNS email subscription for the developer
Several teams need to react to OrderPlaced events, each filtering on different fields, with new teams added over time. Which service fits?
- Amazon EventBridge with rules that match event patterns
- A single SQS queue that every team reads from
- Direct HTTP calls from the order service to each team
- An S3 bucket where the order service writes event files
A developer wants an AI tool that turns a feature request into a written spec, then design and tasks, and then generates code from them. Which AWS tool fits?
- Kiro
- AWS CodeBuild
- AWS X-Ray
- AWS AppConfig
An app must summarize customer reviews using a foundation model through a managed API. Which service should the code call?
- Amazon Bedrock
- AWS CodeArtifact
- Amazon ElastiCache
- AWS AppConfig
Which are benefits of using AI-assisted development tools in a developer workflow? (Select TWO.)
- Automated code reviews that flag likely bugs
- Security scanning suggestions during development
- Removing the need for any human code review
- Guaranteeing code is free of defects
A Lambda function must query an RDS database in a private subnet. What must be configured?
- Attach the function to the VPC with the right subnets and security groups
- Give the RDS instance a public IP address and open port 3306
- Store the database endpoint in a Lambda environment variable and change nothing else
- Add an internet gateway route to the private subnets
A VPC-attached Lambda function can reach RDS but can no longer call a public third-party API. What is the fix?
- Route the function's private subnets through a NAT gateway
- Assign a public IP address directly to the function's network interface
- Increase the function's memory and timeout
- Remove the function's security group
The same function code must connect to different database endpoints in dev and prod. What is the simplest way to configure this?
- Use environment variables set per function or alias
- Hardcode both endpoints and comment one out
- Create a separate code repository for each environment
- Store the endpoint in the function's /tmp directory
How does increasing a Lambda function's memory setting affect it?
- It also increases the CPU power allocated to the function
- It only increases the size of the /tmp directory available to the function
- It raises the maximum timeout beyond 15 minutes
- It has no effect on how fast the function runs
Several functions share the same libraries, and the team wants to package them once. Which feature fits?
- Lambda layers
- Lambda aliases
- Reserved concurrency
- Lambda destinations
A critical function must always have capacity available and must never be starved by other functions in the account. What should be set?
- Reserved concurrency
- Provisioned concurrency only
- A longer timeout
- More memory
An asynchronously invoked function sometimes fails, and the team wants details of failed events sent to an SQS queue along with error info. What should be configured?
- An on-failure Lambda destination
- A larger memory setting
- A Lambda layer for error logging
- An API Gateway usage plan
By default, how many times does Lambda retry a failed asynchronous invocation?
- Two more times
- Never
- Until the event expires with no limit
- Exactly ten times
A function processes SQS batches of 10. One bad message makes the whole batch reprocess. What should be used?
- Report batch item failures so only the failed messages return to the queue
- Set the batch size to 10,000 so failures become rarer across each batch of messages
- Turn off the visibility timeout on the queue
- Invoke the function synchronously from the queue instead
Which Lambda integration polls a source and invokes the function with batches of records?
- An event source mapping, such as for SQS or DynamoDB Streams
- An S3 Event Notification that pushes each new object to the function as it arrives
- An API Gateway proxy integration
- A Lambda destination for successful invocations
Code outside the Lambda handler that creates an SDK client runs when?
- Once per execution environment, then it is reused
- On every invocation, before the handler runs, with no reuse
- Only when the function is deployed for the first time
- Never, because Lambda ignores code outside the handler
A function needs more than 512 MB of scratch space to process large files temporarily. What should be changed?
- Increase ephemeral storage
- Add a Lambda layer
- Increase reserved concurrency
- Point the function at a new Lambda alias
A Lambda function's maximum timeout is 15 minutes.
Which DynamoDB partition key spreads traffic most evenly?
- A high-cardinality attribute such as user ID
- A status attribute with three possible values
- The current date for every item written that day
- A Boolean flag such as isActive
An app must read the latest committed value right after a write. Which DynamoDB read should it use?
- A strongly consistent read
- An eventually consistent read
- A Scan with a filter expression
- A read from a global secondary index
Which operation retrieves items efficiently by partition key without reading the whole table?
- Query
- Scan
- BatchWriteItem
- UpdateTable
A table's key is CustomerId. The app now needs to look up orders by email address. What should be added?
- A global secondary index with email as the partition key
- A local secondary index added to the existing table
- A filter expression on every Scan request
- A second table that copies the full table each hour using a scheduled job
How many read capacity units does one strongly consistent read of a 6 KB item use?
- 2
- 1
- 3
- 6
Two users might update the same DynamoDB item at the same time and overwrite each other. What prevents lost updates?
- A conditional write on a version attribute
- An eventually consistent read before each write
- A larger provisioned write capacity
- A Scan to check the item before writing
Session records in DynamoDB should disappear automatically 24 hours after creation. What should be used?
- Time to Live (TTL) with an expiry timestamp attribute
- A Lambda function that scans and deletes items every minute
- DynamoDB Streams with a filter on the timestamp
- A global secondary index on the creation time
Uploaded files are read heavily for a week, then rarely, and can be deleted after one year. What manages this automatically?
- An S3 Lifecycle configuration with transition and expiration rules
- S3 Versioning with MFA Delete turned on for every object in the bucket
- An S3 bucket policy that denies GetObject
- S3 Transfer Acceleration on the bucket
An app needs sub-millisecond reads of session data and leaderboards shared across many web servers. Which data store fits?
- Amazon ElastiCache
- Amazon S3 Glacier
- Amazon RDS with Multi-AZ
- Amazon EBS volumes
A read-heavy app uses DynamoDB and needs microsecond reads without changing its API calls much. Which cache fits?
- DynamoDB Accelerator (DAX)
- Amazon CloudFront
- Amazon S3 Transfer Acceleration
- An RDS read replica
A cache is filled only when a request misses, and then the data is stored for next time. What is this strategy called?
- Lazy loading
- Write-through
- Write-behind batching
- Read replication
Users must see updated prices right after an update, and stale cache data is not acceptable. Which caching strategy fits?
- Write-through caching
- Lazy loading with a 24-hour TTL
- No TTL and no updates to the cache
- Caching only on the client's browser
A Query on a large DynamoDB table returns only part of the results with a LastEvaluatedKey. What should the code do?
- Repeat the Query with ExclusiveStartKey set to that key
- Switch to a Scan so all results come back in one call
- Increase the table's write capacity
- Treat the partial result as complete
Which statements about DynamoDB secondary indexes are true? (Select TWO.)
- A local secondary index must be created when the table is created
- A global secondary index supports only eventually consistent reads
- A global secondary index must share the table's partition key
- A local secondary index can be added to an existing table at any time
For an SQS event source, Lambda polls the queue and invokes the function on your behalf.
Which DynamoDB API writes changes to several items, even in different tables, as a single all-or-nothing operation?
- TransactWriteItems
- BatchWriteItem
- PutItem
- UpdateTable
An app must send a small binary image to a Lambda function inside a JSON request body. What is the usual approach?
- Base64-encode the image data before adding it to the JSON
- Convert the image to XML before adding it to the body
- Split the image into separate KMS-encrypted 4 KB chunks
- Send the image as a query string parameter in plain binary form
A mobile app needs user sign-up and sign-in, and returns JWTs that the backend API can verify. Which service fits?
- Amazon Cognito user pools
- Amazon Cognito identity pools
- AWS IAM Identity Center
- AWS STS GetSessionToken
Signed-in mobile users need temporary AWS credentials to upload directly to their own S3 prefix. Which service provides them?
- Amazon Cognito identity pools
- Amazon Cognito user pools alone
- IAM users created for every customer
- AWS Private CA
Users already sign in with a corporate SAML 2.0 identity provider. How can an app give them access to AWS resources without creating IAM users?
- Use identity federation so the IdP's assertions map to IAM roles
- Create an IAM user for each employee, all with the same shared password
- Share one IAM user's access keys with every employee
- Add each employee's email to an S3 bucket policy
An API Gateway REST API must accept only requests that carry a valid sign-in token from the app's user directory. What should be configured?
- A Cognito user pool authorizer on the API methods
- A usage plan with API keys
- A Cognito identity pool on each method
- A mock integration on each method