Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 1
Question 1
A product service loses most of its cache entries at once and the backing database receives thousands of simultaneous reloads. Which implementation approach BEST addresses this requirement?
- Remove cache invalidation and hold every value forever.
- Add expiration jitter and single-flight request coalescing or locking around cache repopulation.
- Set all popular cache keys to expire at the same exact second.
- Increase retry storms at the database when cache misses surge.
Explanation
Correct Answer
B:Add expiration jitter and single-flight request coalescing or locking around cache repopulation. Coordinated cache refresh and TTL jitter reduce thundering-herd load. A confirming test would show: Cache-miss burst metrics shrink and backend query rates stay controlled during expiration.
Incorrect Answers
A:Remove cache invalidation and hold every value forever. This suggestion does not establish the required application cache stampede; the relevant risk is that simultaneous expiry of a hot key can cause redundant backend load even with a high steady-state hit rate.
C:Set all popular cache keys to expire at the same exact second. This suggestion does not establish the required application cache stampede; the relevant risk is that simultaneous expiry of a hot key can cause redundant backend load even with a high steady-state hit rate.
D:Increase retry storms at the database when cache misses surge. This suggestion does not establish the required application cache stampede; the relevant risk is that simultaneous expiry of a hot key can cause redundant backend load even with a high steady-state hit rate.
Question 2
A server application calls DynamoDB with valid IAM access but manually constructed requests are rejected. Which implementation approach BEST addresses this requirement?
- Put a Cognito ID token into the SigV4 secret-key field.
- Paste a fixed signed header into every outgoing request.
- Use an AWS SDK with its default credential provider chain and SigV4 request signing.
- Remove the signature header and rely on network privacy.
Explanation
Correct Answer
C:Use an AWS SDK with its default credential provider chain and SigV4 request signing. SigV4 signs request components using AWS credentials and short-lived credentials include a session token. A confirming test would show: API requests carry valid signatures derived from current credentials and pass IAM authorization.
Incorrect Answers
A:Put a Cognito ID token into the SigV4 secret-key field. This suggestion does not establish the required SigV4 authenticated SDK requests; the relevant risk is that manually reusing an old signature fails when headers, body, timestamps, or credentials change.
B:Paste a fixed signed header into every outgoing request. This suggestion does not establish the required SigV4 authenticated SDK requests; the relevant risk is that manually reusing an old signature fails when headers, body, timestamps, or credentials change.
D:Remove the signature header and rely on network privacy. This suggestion does not establish the required SigV4 authenticated SDK requests; the relevant risk is that manually reusing an old signature fails when headers, body, timestamps, or credentials change.
Question 3
A staging application needs encrypted configuration parameters with controlled IAM/KMS access. Which implementation approach BEST addresses this requirement?
- Put the secret in a plain CloudFormation output without protection.
- Store the encrypted string and its decryption key together in a public README.
- Store the parameter as an SSM Parameter Store SecureString with KMS protection and restricted retrieval.
- Print parameter contents to every startup log.
Explanation
Correct Answer
C:Store the parameter as an SSM Parameter Store SecureString with KMS protection and restricted retrieval. SecureString parameters protect parameter values at rest and require appropriate API and KMS permissions. A confirming test would show: Authorized reads with decryption return the intended value while unauthorized callers cannot decrypt it.
Incorrect Answers
A:Put the secret in a plain CloudFormation output without protection. This suggestion does not establish the required Parameter Store secure strings; the relevant risk is that a plaintext String parameter does not provide the intended encrypted-at-rest secret boundary.
B:Store the encrypted string and its decryption key together in a public README. This suggestion does not establish the required Parameter Store secure strings; the relevant risk is that a plaintext String parameter does not provide the intended encrypted-at-rest secret boundary.
D:Print parameter contents to every startup log. This suggestion does not establish the required Parameter Store secure strings; the relevant risk is that a plaintext String parameter does not provide the intended encrypted-at-rest secret boundary.
Question 4
A new Lambda release must be tested while the stable production alias still resolves to the old version. Which implementation approach BEST addresses this requirement?
- Publish immutable Lambda versions and point separate aliases to the intended tested version.
- Overwrite a published Lambda version with new code.
- Test $LATEST and assume aliases always follow it automatically.
- Delete all aliases so clients choose versions randomly.
Explanation
Correct Answer
A:Publish immutable Lambda versions and point separate aliases to the intended tested version. Lambda versions snapshot function code and configuration; aliases provide movable references. A confirming test would show: Calls through each alias invoke the expected immutable version and production remains stable.
Incorrect Answers
B:Overwrite a published Lambda version with new code. This suggestion does not establish the required Lambda alias version testing; the relevant risk is that invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions.
C:Test $LATEST and assume aliases always follow it automatically. This suggestion does not establish the required Lambda alias version testing; the relevant risk is that invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions.
D:Delete all aliases so clients choose versions randomly. This suggestion does not establish the required Lambda alias version testing; the relevant risk is that invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions.
Question 5
An asynchronous Lambda must preserve request and response context when a job ultimately fails. Which implementation approach BEST addresses this requirement?
- Use Lambda destinations for each synchronous SDK invocation without wrapping.
- Replace async destinations with S3 object versioning.
- Use a Lambda asynchronous failure destination for an invocation record instead of relying solely on a DLQ.
- Drop the event after the first retry without a failure sink.
Explanation
Correct Answer
C:Use a Lambda asynchronous failure destination for an invocation record instead of relying solely on a DLQ. Destinations for async Lambda invocations capture richer invocation outcomes than traditional dead-letter queues. A confirming test would show: The target receives a record including request details and failure response context.
Incorrect Answers
A:Use Lambda destinations for each synchronous SDK invocation without wrapping. This suggestion does not establish the required Lambda destinations versus DLQ; the relevant risk is that treating an async DLQ as a complete execution trace omits response context.
B:Replace async destinations with S3 object versioning. This suggestion does not establish the required Lambda destinations versus DLQ; the relevant risk is that treating an async DLQ as a complete execution trace omits response context.
D:Drop the event after the first retry without a failure sink. This suggestion does not establish the required Lambda destinations versus DLQ; the relevant risk is that treating an async DLQ as a complete execution trace omits response context.
Question 6
A Lambda application needs custom order value metrics without a high-cardinality API PutMetricData call for each request. Which implementation approach BEST addresses this requirement?
- Emit valid CloudWatch Embedded Metric Format JSON with metric definitions and safe dimension cardinality.
- Write unstructured text and assume EMF auto-discovers numeric fields.
- Disable CloudWatch Logs delivery before emitting metrics.
- Include unique session IDs as dimensions for every request.
Explanation
Correct Answer
A:Emit valid CloudWatch Embedded Metric Format JSON with metric definitions and safe dimension cardinality. EMF lets supported log consumers extract metrics from structured events and dimensions affect metric series count. A confirming test would show: CloudWatch extracts a named custom metric from the structured log events with the expected dimensions.
Incorrect Answers
B:Write unstructured text and assume EMF auto-discovers numeric fields. This suggestion does not establish the required CloudWatch embedded metric format; the relevant risk is that including a unique request ID as a metric dimension can create excessive high-cardinality metric series.
C:Disable CloudWatch Logs delivery before emitting metrics. This suggestion does not establish the required CloudWatch embedded metric format; the relevant risk is that including a unique request ID as a metric dimension can create excessive high-cardinality metric series.
D:Include unique session IDs as dimensions for every request. This suggestion does not establish the required CloudWatch embedded metric format; the relevant risk is that including a unique request ID as a metric dimension can create excessive high-cardinality metric series.
Question 7
A queue worker occasionally needs four minutes to finish processing a PDF invoice and a second worker receives the same message early. Which implementation approach BEST addresses this requirement?
- Reduce the visibility timeout to one second.
- Rely on process memory to mark every SQS message complete.
- Remove DeleteMessage calls entirely.
- Set the SQS visibility timeout above the expected processing interval and delete the message after successful work.
Explanation
Correct Answer
D:Set the SQS visibility timeout above the expected processing interval and delete the message after successful work. Visibility hides an in-flight SQS message temporarily; it does not acknowledge completion. A confirming test would show: No second delivery occurs during the normal work interval and a completed message is explicitly deleted.
Incorrect Answers
A:Reduce the visibility timeout to one second. This suggestion does not establish the required SQS visibility timeout; the relevant risk is that a too-short visibility timeout lets another consumer receive unfinished work.
B:Rely on process memory to mark every SQS message complete. This suggestion does not establish the required SQS visibility timeout; the relevant risk is that a too-short visibility timeout lets another consumer receive unfinished work.
C:Remove DeleteMessage calls entirely. This suggestion does not establish the required SQS visibility timeout; the relevant risk is that a too-short visibility timeout lets another consumer receive unfinished work.
Question 8
A public booking endpoint must reject missing required request fields before invoking backend business logic. Which implementation approach BEST addresses this requirement?
- Expose an unrestricted mock integration to all clients.
- Configure an API Gateway request validator and matching request model for required JSON structure.
- Increase backend memory to handle missing JSON keys.
- Move schema validation exclusively into CloudWatch alarms.
Explanation
Correct Answer
B:Configure an API Gateway request validator and matching request model for required JSON structure. Validating at the API boundary reduces invalid traffic and keeps backend operations focused. A confirming test would show: Malformed requests produce a client error before backend invocation while valid requests reach the integration.
Incorrect Answers
A:Expose an unrestricted mock integration to all clients. This suggestion does not establish the required API Gateway request validation; the relevant risk is that missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
C:Increase backend memory to handle missing JSON keys. This suggestion does not establish the required API Gateway request validation; the relevant risk is that missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
D:Move schema validation exclusively into CloudWatch alarms. This suggestion does not establish the required API Gateway request validation; the relevant risk is that missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
Question 9
A product catalog has repeated reads of slowly changing entries and the database is overloaded. Which implementation approach BEST addresses this requirement?
- Use a cache-aside pattern with a defined TTL and invalidation on application updates.
- Cache every mutable value forever with no invalidation.
- Replace database writes with cache-only updates.
- Increase retry counts on cache misses without ever reading the source of truth.
Explanation
Correct Answer
A:Use a cache-aside pattern with a defined TTL and invalidation on application updates. Cache-aside populates on misses and requires an explicit freshness or invalidation strategy. A confirming test would show: Cache hit-rate increases and backend read load falls while update invalidation keeps freshness within policy.
Incorrect Answers
B:Cache every mutable value forever with no invalidation. This suggestion does not establish the required ElastiCache cache-aside; the relevant risk is that never expiring cached entries can continue to return stale records after updates.
C:Replace database writes with cache-only updates. This suggestion does not establish the required ElastiCache cache-aside; the relevant risk is that never expiring cached entries can continue to return stale records after updates.
D:Increase retry counts on cache misses without ever reading the source of truth. This suggestion does not establish the required ElastiCache cache-aside; the relevant risk is that never expiring cached entries can continue to return stale records after updates.
Question 10
A developer service calls an external throttled API and must recover from transient 429 responses without a request storm. Which implementation approach BEST addresses this requirement?
- Retry every 4xx response forever.
- Issue all retry attempts in parallel immediately.
- Remove timeouts and hold threads indefinitely.
- Use bounded exponential backoff with jitter, an explicit timeout, and an idempotent request design.
Explanation
Correct Answer
D:Use bounded exponential backoff with jitter, an explicit timeout, and an idempotent request design. Jittered bounded retries spread transient failure load instead of synchronized retry spikes. A confirming test would show: Retry telemetry shows spaced attempts with eventual success or a controlled terminal error.
Incorrect Answers
A:Retry every 4xx response forever. This suggestion does not establish the required SDK adaptive retries; the relevant risk is that immediate unbounded retries amplify throttling and can repeat non-idempotent operations.
B:Issue all retry attempts in parallel immediately. This suggestion does not establish the required SDK adaptive retries; the relevant risk is that immediate unbounded retries amplify throttling and can repeat non-idempotent operations.
C:Remove timeouts and hold threads indefinitely. This suggestion does not establish the required SDK adaptive retries; the relevant risk is that immediate unbounded retries amplify throttling and can repeat non-idempotent operations.