Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 21
Question 200
A team needs to deploy a shared Node.js utility library with several separate Lambda handlers. Which developer action MOST directly meets the stated constraint?
- Put the dependency archive in CloudWatch Logs expecting Lambda to import it.
- Attach the layer without checking runtime or architecture compatibility.
- Publish compatible dependencies as a versioned Lambda layer and attach the required layer version to functions.
- Enable partial batch responses and return the identifiers of failed batch items from the handler.
Explanation
Correct Answer
C:Publish compatible dependencies as a versioned Lambda layer and attach the required layer version to functions. Lambda layers package reusable dependencies separately while runtime compatibility must still match. For this second operating case, verify that each function loads the expected dependency version under the declared runtime and architecture.
Incorrect Answers
A:Put the dependency archive in CloudWatch Logs expecting Lambda to import it. This shortcut would leave the Lambda layer dependency management requirement unresolved; a layer built for a different runtime or architecture can cause module import failures.
B:Attach the layer without checking runtime or architecture compatibility. This shortcut would leave the Lambda layer dependency management requirement unresolved; a layer built for a different runtime or architecture can cause module import failures.
D:This technique primarily addresses Lambda event source partial batch response; it would not demonstrate Lambda layer dependency management or directly prove that each function loads the expected dependency version under the declared runtime and architecture.
Question 201
A production stack update fails with a permission or dependency error shown in resource events. Which developer action MOST directly meets the stated constraint?
- Trace the caller identity, the requested S3 action, and the KMS key permissions with CloudTrail evidence.
- Ignore stack events and deploy the same malformed template repeatedly.
- Change only the API base URL for an IAM resource creation error.
- Inspect CloudFormation stack events and failed resource status to identify the underlying deployment error.
Explanation
Correct Answer
D:Inspect CloudFormation stack events and failed resource status to identify the underlying deployment error. Stack resource events reveal deployment-level failures that application logs might never contain. For this second operating case, verify that the failed resource event includes a concrete status reason that matches the attempted operation.
Incorrect Answers
A:This technique primarily addresses AccessDenied troubleshooting chain; it would not demonstrate failed CloudFormation deployment or directly prove that the failed resource event includes a concrete status reason that matches the attempted operation.
B:Ignore stack events and deploy the same malformed template repeatedly. This shortcut would leave the failed CloudFormation deployment requirement unresolved; debugging handler business code cannot fix a stack resource creation permission error.
C:Change only the API base URL for an IAM resource creation error. This shortcut would leave the failed CloudFormation deployment requirement unresolved; debugging handler business code cannot fix a stack resource creation permission error.
Question 202
An SQS-triggered Lambda handles batches of invoice messages with one malformed item. Which developer action MOST directly meets the stated constraint?
- Set environment-specific Lambda configuration or AWS AppConfig values and read them at runtime.
- Mark every batch entry failed to preserve one error.
- Enable partial batch responses and return the identifiers of failed batch items from the handler.
- Delete the full SQS queue when one record fails.
Explanation
Correct Answer
C:Enable partial batch responses and return the identifiers of failed batch items from the handler. SQS partial batch response avoids unnecessary redelivery of successful records in a partially failed batch. For this second operating case, verify that only failed message IDs are retried while acknowledged batch records remain completed.
Incorrect Answers
A:This technique primarily addresses Lambda environment configuration; it would not demonstrate Lambda event source partial batch response or directly prove that only failed message IDs are retried while acknowledged batch records remain completed.
B:Mark every batch entry failed to preserve one error. This shortcut would leave the Lambda event source partial batch response requirement unresolved; raising an exception for the whole batch makes the entire batch eligible for retry.
D:Delete the full SQS queue when one record fails. This shortcut would leave the Lambda event source partial batch response requirement unresolved; raising an exception for the whole batch makes the entire batch eligible for retry.
Question 203
A table stores millions of tenant messages but most writes share one constant partition key. After implementing the planned DynamoDB partition key cardinality change, which observation is the MOST direct proof that its specific requirement has been met?
- CloudTrail or SDK results confirm the expected action succeeds while unrelated resources remain denied.
- One competing write succeeds and the other receives a conditional-check failure.
- Consumed capacity and throttling metrics distribute more evenly across partition keys.
- Invocations in each environment show the configured nonsecret value without changing application source.
Explanation
Correct Answer
C:Consumed capacity and throttling metrics distribute more evenly across partition keys. This directly validates DynamoDB partition key cardinality under the stated workload and confirms the intended AWS behavior: dynamoDB partition-key choice influences physical request distribution and hot-key throttling.
Incorrect Answers
A:This observation tests Lambda execution role least privilege, rather than confirming DynamoDB partition key cardinality. It does not by itself establish that consumed capacity and throttling metrics distribute more evenly across partition keys.
B:This observation tests DynamoDB conditional update, rather than confirming DynamoDB partition key cardinality. It does not by itself establish that consumed capacity and throttling metrics distribute more evenly across partition keys.
D:This observation tests Lambda environment configuration, rather than confirming DynamoDB partition key cardinality. It does not by itself establish that consumed capacity and throttling metrics distribute more evenly across partition keys.
Question 204
A user-facing API has intermittent 429 or ProvisionedThroughputExceeded responses for one hot key. After implementing the planned DynamoDB throttling investigation change, which observation is the MOST direct proof that its specific requirement has been met?
- Log queries can reliably filter the same fields across success and failure events.
- A controlled threshold breach moves the alarm to ALARM and the subscribed channel receives a notification.
- Telemetry separates initialization delay from handler time and shows improvement after the change.
- Metrics and request logs identify concentrated key traffic or exhausted write/read capacity.
Explanation
Correct Answer
D:Metrics and request logs identify concentrated key traffic or exhausted write/read capacity. This directly validates DynamoDB throttling investigation under the stated workload and confirms the intended AWS behavior: dynamoDB throttling can reflect hot partitions or configured capacity constraints, not just network faults.
Incorrect Answers
A:This observation tests structured JSON logging, rather than confirming DynamoDB throttling investigation. It does not by itself establish that metrics and request logs identify concentrated key traffic or exhausted write/read capacity.
B:This observation tests CloudWatch alarm notification, rather than confirming DynamoDB throttling investigation. It does not by itself establish that metrics and request logs identify concentrated key traffic or exhausted write/read capacity.
C:This observation tests Lambda Init Duration diagnosis, rather than confirming DynamoDB throttling investigation. It does not by itself establish that metrics and request logs identify concentrated key traffic or exhausted write/read capacity.
Question 205
A public booking endpoint must reject missing required request fields before invoking backend business logic. After implementing the planned API Gateway request validation change, which observation is the MOST direct proof that its specific requirement has been met?
- Malformed requests produce a client error before backend invocation while valid requests reach the integration.
- CloudTrail or SDK results confirm the expected action succeeds while unrelated resources remain denied.
- Test results and code review demonstrate generated changes meet requirements without new permissions exposure.
- Consumed capacity and throttling metrics distribute more evenly across partition keys.
Explanation
Correct Answer
A:Malformed requests produce a client error before backend invocation while valid requests reach the integration. This directly validates API Gateway request validation under the stated workload and confirms the intended AWS behavior: validating at the API boundary reduces invalid traffic and keeps backend operations focused.
Incorrect Answers
B:This observation tests Lambda execution role least privilege, rather than confirming API Gateway request validation. It does not by itself establish that malformed requests produce a client error before backend invocation while valid requests reach the integration.
C:This observation tests Amazon Q Developer review, rather than confirming API Gateway request validation. It does not by itself establish that malformed requests produce a client error before backend invocation while valid requests reach the integration.
D:This observation tests DynamoDB partition key cardinality, rather than confirming API Gateway request validation. It does not by itself establish that malformed requests produce a client error before backend invocation while valid requests reach the integration.
Question 206
A serverless deployment changes Lambda resource properties and needs predeploy checks. After implementing the planned SAM template validation change, which observation is the MOST direct proof that its specific requirement has been met?
- A deployment smoke test imports all required modules in the deployed Lambda runtime.
- Drift results identify divergent supported properties and a later deployment restores intended state.
- Invalid resource declarations fail the validation stage before stack mutation.
- Peak /tmp usage remains within configured capacity during the largest supported input.
Explanation
Correct Answer
C:Invalid resource declarations fail the validation stage before stack mutation. This directly validates SAM template validation under the stated workload and confirms the intended AWS behavior: template validation catches syntactic and supported structural IaC problems but not all runtime behavior.
Incorrect Answers
A:This observation tests Lambda deployment package dependencies, rather than confirming SAM template validation. It does not by itself establish that invalid resource declarations fail the validation stage before stack mutation.
B:This observation tests infrastructure drift detection, rather than confirming SAM template validation. It does not by itself establish that invalid resource declarations fail the validation stage before stack mutation.
D:This observation tests Lambda ephemeral disk sizing, rather than confirming SAM template validation. It does not by itself establish that invalid resource declarations fail the validation stage before stack mutation.
Question 207
A Lambda image processor spills temporary files to /tmp and fails when intermediate images exceed configured space. After implementing the planned Lambda ephemeral disk sizing change, which observation is the MOST direct proof that its specific requirement has been met?
- The change set shows the intended resource values for the selected environment without modifying source templates.
- Peak /tmp usage remains within configured capacity during the largest supported input.
- Calls through each alias invoke the expected immutable version and production remains stable.
- The build fails on a seeded test failure and publishes an artifact only after tests succeed.
Explanation
Correct Answer
B:Peak /tmp usage remains within configured capacity during the largest supported input. This directly validates Lambda ephemeral disk sizing under the stated workload and confirms the intended AWS behavior: lambda ephemeral storage is separately configurable from memory and has finite per-environment capacity.
Incorrect Answers
A:This observation tests CloudFormation resource parameters, rather than confirming Lambda ephemeral disk sizing. It does not by itself establish that peak /tmp usage remains within configured capacity during the largest supported input.
C:This observation tests Lambda alias version testing, rather than confirming Lambda ephemeral disk sizing. It does not by itself establish that peak /tmp usage remains within configured capacity during the largest supported input.
D:This observation tests CodeBuild buildspec sequencing, rather than confirming Lambda ephemeral disk sizing. It does not by itself establish that peak /tmp usage remains within configured capacity during the largest supported input.
Question 208
An API should be callable only from a known VPC endpoint, not the entire internet. After implementing the planned API Gateway resource policy change, which observation is the MOST direct proof that its specific requirement has been met?
- Secret-read API volume declines while newly rotated credentials are adopted within the specified refresh window.
- Authorized reads with decryption return the intended value while unauthorized callers cannot decrypt it.
- Requests from the intended endpoint succeed and other source contexts receive access denied.
- CloudTrail and target logs show requests authorized only for the permitted source principal.
Explanation
Correct Answer
C:Requests from the intended endpoint succeed and other source contexts receive access denied. This directly validates API Gateway resource policy under the stated workload and confirms the intended AWS behavior: resource policies can restrict the source principals or network context independently from route authorizers.
Incorrect Answers
A:This observation tests credential caching refresh, rather than confirming API Gateway resource policy. It does not by itself establish that requests from the intended endpoint succeed and other source contexts receive access denied.
B:This observation tests Parameter Store secure strings, rather than confirming API Gateway resource policy. It does not by itself establish that requests from the intended endpoint succeed and other source contexts receive access denied.
D:This observation tests service-to-service IAM authorization, rather than confirming API Gateway resource policy. It does not by itself establish that requests from the intended endpoint succeed and other source contexts receive access denied.
Question 209
A checkout Lambda returns occasional 500 errors and its logs include a requestId and errorCode. After implementing the planned CloudWatch Logs Insights root cause change, which observation is the MOST direct proof that its specific requirement has been met?
- The query isolates timestamps and the exact error records associated with the failed request.
- End-to-end traces show the integration completes under the configured limit without gateway timeouts.
- Cache-miss burst metrics shrink and backend query rates stay controlled during expiration.
- CloudWatch extracts a named custom metric from the structured log events with the expected dimensions.
Explanation
Correct Answer
A:The query isolates timestamps and the exact error records associated with the failed request. This directly validates CloudWatch Logs Insights root cause under the stated workload and confirms the intended AWS behavior: correlation IDs allow developers to join related log records and reduce noisy searches.
Incorrect Answers
B:This observation tests API Gateway Lambda integration timeout, rather than confirming CloudWatch Logs Insights root cause. It does not by itself establish that the query isolates timestamps and the exact error records associated with the failed request.
C:This observation tests application cache stampede, rather than confirming CloudWatch Logs Insights root cause. It does not by itself establish that the query isolates timestamps and the exact error records associated with the failed request.
D:This observation tests CloudWatch embedded metric format, rather than confirming CloudWatch Logs Insights root cause. It does not by itself establish that the query isolates timestamps and the exact error records associated with the failed request.
Question 210
A distributed trace needs searchable segment labels for order type but must not index private customer notes. After implementing the planned tracing annotations versus metadata change, which observation is the MOST direct proof that its specific requirement has been met?
- Trace searches filter by annotations without exposing private payloads as indexed labels.
- Only events matching the subscriber's policy reach its target while other topics of work are skipped.
- The denied API event identifies the principal and missing permission or key-policy condition.
- Old routine log events age out according to policy while newer diagnostic events stay queryable.
Explanation
Correct Answer
A:Trace searches filter by annotations without exposing private payloads as indexed labels. This directly validates tracing annotations versus metadata under the stated workload and confirms the intended AWS behavior: x-Ray annotations are indexed for filtering; metadata provides supplementary nonindexed values.
Incorrect Answers
B:This observation tests SNS subscription filter policy, rather than confirming tracing annotations versus metadata. It does not by itself establish that trace searches filter by annotations without exposing private payloads as indexed labels.
C:This observation tests AccessDenied troubleshooting chain, rather than confirming tracing annotations versus metadata. It does not by itself establish that trace searches filter by annotations without exposing private payloads as indexed labels.
D:This observation tests CloudWatch log retention, rather than confirming tracing annotations versus metadata. It does not by itself establish that trace searches filter by annotations without exposing private payloads as indexed labels.