Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 11
Question 100
An ECS service unexpectedly runs a different build because the pipeline reuses the mutable latest tag. Which implementation approach BEST addresses this requirement?
- Change only the ECS service description without updating task image references.
- Rebuild source from the main branch during a rollback.
- Pin deployment manifests to an immutable image digest or unique tested release tag.
- Pull latest without recording its digest.
Explanation
Correct Answer
C:Pin deployment manifests to an immutable image digest or unique tested release tag. Immutable artifact references make releases and rollbacks reproducible. A confirming test would show: The running task image digest matches the tested build artifact after deployment and rollback.
Incorrect Answers
A:Change only the ECS service description without updating task image references. This suggestion does not establish the required immutable container image tags; the relevant risk is that a mutable latest tag can point to different image bytes on separate deployments.
B:Rebuild source from the main branch during a rollback. This suggestion does not establish the required immutable container image tags; the relevant risk is that a mutable latest tag can point to different image bytes on separate deployments.
D:Pull latest without recording its digest. This suggestion does not establish the required immutable container image tags; the relevant risk is that a mutable latest tag can point to different image bytes on separate deployments.
Question 101
A distributed trace needs searchable segment labels for order type but must not index private customer notes. Which implementation approach BEST addresses this requirement?
- Use low-cardinality X-Ray annotations for indexed filters and metadata for nonindexed diagnostic details.
- Store full access tokens as trace annotations.
- Disable tracing to avoid specifying safe fields.
- Put all filterable dimensions only into unindexed metadata.
Explanation
Correct Answer
A:Use low-cardinality X-Ray annotations for indexed filters and metadata for nonindexed diagnostic details. X-Ray annotations are indexed for filtering; metadata provides supplementary nonindexed values. A confirming test would show: Trace searches filter by annotations without exposing private payloads as indexed labels.
Incorrect Answers
B:Store full access tokens as trace annotations. This suggestion does not establish the required tracing annotations versus metadata; the relevant risk is that putting sensitive free-form payloads in indexed annotations creates exposure and high-cardinality filtering problems.
C:Disable tracing to avoid specifying safe fields. This suggestion does not establish the required tracing annotations versus metadata; the relevant risk is that putting sensitive free-form payloads in indexed annotations creates exposure and high-cardinality filtering problems.
D:Put all filterable dimensions only into unindexed metadata. This suggestion does not establish the required tracing annotations versus metadata; the relevant risk is that putting sensitive free-form payloads in indexed annotations creates exposure and high-cardinality filtering problems.
Question 102
An external tax service has a prolonged outage and checkout must degrade predictably. Which developer action MOST directly meets the stated constraint?
- Use a circuit breaker with bounded timeouts and a documented fallback for the external dependency.
- Remove every timeout from partner calls.
- Define an API Gateway mapping template or parameter mapping that explicitly transforms the incoming request.
- Retry every failed request with zero delay forever.
Explanation
Correct Answer
A:Use a circuit breaker with bounded timeouts and a documented fallback for the external dependency. Circuit breakers limit cascading latency while allowing controlled recovery after dependency outages. For this second operating case, verify that during a sustained fault, calls fail fast through the fallback and recover through controlled probes.
Incorrect Answers
B:Remove every timeout from partner calls. This shortcut would leave the third-party circuit breaker requirement unresolved; keeping all requests waiting for an unhealthy dependency exhausts caller concurrency.
C:This technique primarily addresses API Gateway mapping templates; it would not demonstrate third-party circuit breaker or directly prove that during a sustained fault, calls fail fast through the fallback and recover through controlled probes.
D:Retry every failed request with zero delay forever. This shortcut would leave the third-party circuit breaker requirement unresolved; keeping all requests waiting for an unhealthy dependency exhausts caller concurrency.
Question 103
A compliance job uses an existing symmetric customer-managed KMS key and must rotate cryptographic material for future encryptions. Which developer action MOST directly meets the stated constraint?
- Use supported KMS automatic key rotation while keeping the original KMS key identity for decryption.
- Change the KMS key ID in every stored old ciphertext without re-encrypting.
- Ensure the principal has S3 object permission and the required KMS decrypt permission on the encryption key.
- Delete the old key as soon as rotation is enabled.
Explanation
Correct Answer
A:Use supported KMS automatic key rotation while keeping the original KMS key identity for decryption. KMS-managed rotation retains key identity and the old material required to decrypt previous ciphertext. For this second operating case, verify that older ciphertext remains decryptable using protected historical key material and new operations use current material.
Incorrect Answers
B:Change the KMS key ID in every stored old ciphertext without re-encrypting. This shortcut would leave the KMS rotation scope requirement unresolved; deleting the KMS key during rotation makes ciphertext inaccessible after deletion.
C:This technique primarily addresses S3 SSE-KMS access; it would not demonstrate KMS rotation scope or directly prove that older ciphertext remains decryptable using protected historical key material and new operations use current material.
D:Delete the old key as soon as rotation is enabled. This shortcut would leave the KMS rotation scope requirement unresolved; deleting the KMS key during rotation makes ciphertext inaccessible after deletion.
Question 104
Developers ask Amazon Q Developer for tests during a refactor and need to validate security assumptions. Which developer action MOST directly meets the stated constraint?
- Use Amazon Q Developer for suggestions and review generated code with tests, IAM checks, and human approval.
- Use a circuit breaker with bounded timeouts and a documented fallback for the external dependency.
- Treat AI output as authoritative without executing tests.
- Grant administrator access to every generated component.
Explanation
Correct Answer
A:Use Amazon Q Developer for suggestions and review generated code with tests, IAM checks, and human approval. AI coding suggestions accelerate development but do not replace validation or security review. For this second operating case, verify that test results and code review demonstrate generated changes meet requirements without new permissions exposure.
Incorrect Answers
B:This technique primarily addresses third-party circuit breaker; it would not demonstrate Amazon Q Developer review or directly prove that test results and code review demonstrate generated changes meet requirements without new permissions exposure.
C:Treat AI output as authoritative without executing tests. This shortcut would leave the Amazon Q Developer review requirement unresolved; accepting generated code without review can introduce incorrect APIs or excessive permissions.
D:Grant administrator access to every generated component. This shortcut would leave the Amazon Q Developer review requirement unresolved; accepting generated code without review can introduce incorrect APIs or excessive permissions.
Question 105
One AWS service integration needs scoped authority to publish to a different service in the same account. Which developer action MOST directly meets the stated constraint?
- Place a permanent admin API key in both Lambda source files.
- Use IAM-authenticated AWS SDK calls with a narrowly scoped identity policy and resource policy when required.
- Configure a JWT authorizer with the trusted issuer and audience and bind it to protected API routes.
- Make every target endpoint publicly invokable to avoid IAM trust.
Explanation
Correct Answer
B:Use IAM-authenticated AWS SDK calls with a narrowly scoped identity policy and resource policy when required. AWS service-to-service calls use IAM identity and resource permissions according to API requirements. For this second operating case, verify that cloudTrail and target logs show requests authorized only for the permitted source principal.
Incorrect Answers
A:Place a permanent admin API key in both Lambda source files. This shortcut would leave the service-to-service IAM authorization requirement unresolved; a backend-to-backend call can fail when identity access exists but a required resource policy denies the principal.
C:This technique primarily addresses API Gateway JWT authorizer; it would not demonstrate service-to-service IAM authorization or directly prove that cloudTrail and target logs show requests authorized only for the permitted source principal.
D:Make every target endpoint publicly invokable to avoid IAM trust. This shortcut would leave the service-to-service IAM authorization requirement unresolved; a backend-to-backend call can fail when identity access exists but a required resource policy denies the principal.
Question 106
A production API needs an automated notification when 5xx responses cross a sustained threshold. Which developer action MOST directly meets the stated constraint?
- Create a CloudWatch alarm on the relevant metric and send state-change notifications to an approved SNS topic.
- Use an S3 presigned URL expiration as the incident metric.
- Set every alarm threshold to zero without inspecting normal traffic.
- Set a CloudWatch Logs retention policy matching the operational retention requirement.
Explanation
Correct Answer
A:Create a CloudWatch alarm on the relevant metric and send state-change notifications to an approved SNS topic. CloudWatch alarm evaluation compares metric periods against thresholds and actions trigger on state transitions. For this second operating case, verify that a controlled threshold breach moves the alarm to ALARM and the subscribed channel receives a notification.
Incorrect Answers
B:Use an S3 presigned URL expiration as the incident metric. This shortcut would leave the CloudWatch alarm notification requirement unresolved; without the correct metric statistic or alarm action, sustained incidents can remain unnoticed.
C:Set every alarm threshold to zero without inspecting normal traffic. This shortcut would leave the CloudWatch alarm notification requirement unresolved; without the correct metric statistic or alarm action, sustained incidents can remain unnoticed.
D:This technique primarily addresses CloudWatch log retention; it would not demonstrate CloudWatch alarm notification or directly prove that a controlled threshold breach moves the alarm to ALARM and the subscribed channel receives a notification.
Question 107
A document portal lets users download one private object for a limited time. Which developer action MOST directly meets the stated constraint?
- Index searchable fields in Amazon OpenSearch Service and query the text index with an appropriate analyzer.
- Make the entire bucket publicly writable.
- Embed an IAM user's permanent secret access key in mobile apps.
- Generate a scoped presigned S3 URL with the intended method, object key, and expiration.
Explanation
Correct Answer
D:Generate a scoped presigned S3 URL with the intended method, object key, and expiration. Presigned requests delegate bounded use of the signing principal's permissions without exposing long-lived keys. For this second operating case, verify that a request succeeds before expiry for the intended action and fails after the URL is invalid.
Incorrect Answers
A:This technique primarily addresses OpenSearch full-text queries; it would not demonstrate S3 presigned URLs or directly prove that a request succeeds before expiry for the intended action and fails after the URL is invalid.
B:Make the entire bucket publicly writable. This shortcut would leave the S3 presigned URLs requirement unresolved; publishing access keys in client code exposes reusable credentials beyond one object operation.
C:Embed an IAM user's permanent secret access key in mobile apps. This shortcut would leave the S3 presigned URLs requirement unresolved; publishing access keys in client code exposes reusable credentials beyond one object operation.
Question 108
A shipping integration receives duplicate fulfilment notifications for the same order while a worker scales out. Which developer action MOST directly meets the stated constraint?
- Write a stable event ID with a conditional DynamoDB write and skip a side effect when that ID was processed.
- Configure a source queue redrive policy and a dead-letter queue with an appropriate maxReceiveCount.
- Disable every retry including recoverable failures.
- Increase the Lambda timeout without tracking event identity.
Explanation
Correct Answer
A:Write a stable event ID with a conditional DynamoDB write and skip a side effect when that ID was processed. At-least-once message delivery needs application-level idempotency for irreversible side effects. For this second operating case, verify that replaying the identical event leaves one committed business operation and one idempotency record.
Incorrect Answers
B:This technique primarily addresses SQS dead-letter queues; it would not demonstrate idempotent event handling or directly prove that replaying the identical event leaves one committed business operation and one idempotency record.
C:Disable every retry including recoverable failures. This shortcut would leave the idempotent event handling requirement unresolved; duplicate deliveries bypass a stable deduplication check and cause the same side effect twice.
D:Increase the Lambda timeout without tracking event identity. This shortcut would leave the idempotent event handling requirement unresolved; duplicate deliveries bypass a stable deduplication check and cause the same side effect twice.
Question 109
An infrequently invoked Lambda spends most of its latency initializing libraries before its handler starts. Which developer action MOST directly meets the stated constraint?
- Disable CloudWatch logs to guarantee warm execution.
- Measure the integration latency and redesign or optimize synchronous work to finish within the API integration limit.
- Increase SQS message retention to remove Lambda initialization.
- Inspect Lambda init-duration and handler-duration metrics and reduce startup work or use provisioned concurrency when justified.
Explanation
Correct Answer
D:Inspect Lambda init-duration and handler-duration metrics and reduce startup work or use provisioned concurrency when justified. Lambda cold-start initialization is distinct from code execution duration. For this second operating case, verify that telemetry separates initialization delay from handler time and shows improvement after the change.
Incorrect Answers
A:Disable CloudWatch logs to guarantee warm execution. This shortcut would leave the Lambda Init Duration diagnosis requirement unresolved; optimizing only DynamoDB Query speed cannot eliminate time spent before the handler begins.
B:This technique primarily addresses API Gateway Lambda integration timeout; it would not demonstrate Lambda Init Duration diagnosis or directly prove that telemetry separates initialization delay from handler time and shows improvement after the change.
C:Increase SQS message retention to remove Lambda initialization. This shortcut would leave the Lambda Init Duration diagnosis requirement unresolved; optimizing only DynamoDB Query speed cannot eliminate time spent before the handler begins.
Question 110
A synchronous API frequently reaches its integration timeout despite a long Lambda function timeout. Which developer action MOST directly meets the stated constraint?
- Set the Lambda function timeout to fifteen minutes and assume API Gateway waits equally long.
- Measure the integration latency and redesign or optimize synchronous work to finish within the API integration limit.
- Trace the caller identity, the requested S3 action, and the KMS key permissions with CloudTrail evidence.
- Increase DynamoDB TTL to change HTTP integration deadlines.
Explanation
Correct Answer
B:Measure the integration latency and redesign or optimize synchronous work to finish within the API integration limit. API integration timeout limits are independent of a Lambda function's own maximum runtime. For this second operating case, verify that end-to-end traces show the integration completes under the configured limit without gateway timeouts.
Incorrect Answers
A:Set the Lambda function timeout to fifteen minutes and assume API Gateway waits equally long. This shortcut would leave the API Gateway Lambda integration timeout requirement unresolved; a longer Lambda timeout alone does not prevent an earlier API Gateway integration timeout.
C:This technique primarily addresses AccessDenied troubleshooting chain; it would not demonstrate API Gateway Lambda integration timeout or directly prove that end-to-end traces show the integration completes under the configured limit without gateway timeouts.
D:Increase DynamoDB TTL to change HTTP integration deadlines. This shortcut would leave the API Gateway Lambda integration timeout requirement unresolved; a longer Lambda timeout alone does not prevent an earlier API Gateway integration timeout.