Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 43
Question 420
A web service downloads private S3 objects that are encrypted using an AWS KMS key. Suppose the team omits the intended S3 SSE-KMS access safeguard. Which failure mode is the MOST direct risk of that omission?
- Ignoring exp claims leaves a path for stale tokens to be reused as authorization.
- A role allowed to GetObject but denied KMS Decrypt cannot read the plaintext.
- Deleting the KMS key during rotation makes ciphertext inaccessible after deletion.
- Confusing a user pool with an identity pool leaves the app without the expected login and user-directory flow.
Explanation
Correct Answer
B:A role allowed to GetObject but denied KMS Decrypt cannot read the plaintext. The planned prevention is to ensure the principal has S3 object permission and the required KMS decrypt permission on the encryption key; the most direct verification is that the object can be retrieved and decrypted by the approved principal without broad KMS rights.
Incorrect Answers
A:That failure mechanism is associated with bearer token refresh and expiry. The omitted S3 SSE-KMS access protection instead causes this problem: a role allowed to GetObject but denied KMS Decrypt cannot read the plaintext.
C:That failure mechanism is associated with KMS rotation scope. The omitted S3 SSE-KMS access protection instead causes this problem: a role allowed to GetObject but denied KMS Decrypt cannot read the plaintext.
D:That failure mechanism is associated with Cognito user pool authentication. The omitted S3 SSE-KMS access protection instead causes this problem: a role allowed to GetObject but denied KMS Decrypt cannot read the plaintext.
Question 421
A public booking endpoint must reject missing required request fields before invoking backend business logic. Suppose the team omits the intended API Gateway request validation safeguard. Which failure mode is the MOST direct risk of that omission?
- Missing security-group or routing rules prevent TCP access to a private endpoint.
- A missing destination silently loses terminal failure context beyond default handling.
- A one-shot Lambda chain obscures per-step recovery and can exceed execution constraints.
- Missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
Explanation
Correct Answer
D:Missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions. The planned prevention is to configure an API Gateway request validator and matching request model for required JSON structure; the most direct verification is that malformed requests produce a client error before backend invocation while valid requests reach the integration.
Incorrect Answers
A:That failure mechanism is associated with Lambda VPC private data access. The omitted API Gateway request validation protection instead causes this problem: missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
B:That failure mechanism is associated with Lambda asynchronous failure destination. The omitted API Gateway request validation protection instead causes this problem: missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
C:That failure mechanism is associated with Step Functions orchestration. The omitted API Gateway request validation protection instead causes this problem: missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
Question 422
A build service in one account needs read-only access to a deployment artifact bucket in a second account. Suppose the team omits the intended IAM STS AssumeRole cross-account safeguard. Which failure mode is the MOST direct risk of that omission?
- Removing a secret from the latest file does not erase its exposure in repository history.
- Ignoring exp claims leaves a path for stale tokens to be reused as authorization.
- A process-wide cache with no expiry continues to use revoked values.
- A correct permission policy without an allowed trust relationship cannot be assumed.
Explanation
Correct Answer
D:A correct permission policy without an allowed trust relationship cannot be assumed. The planned prevention is to assume a scoped IAM role through STS with a trust policy permitting the source principal; the most direct verification is that cloudTrail shows the expected assumed role session and only the allowed target-account API actions succeed.
Incorrect Answers
A:That failure mechanism is associated with secret scanning in CI. The omitted IAM STS AssumeRole cross-account protection instead causes this problem: a correct permission policy without an allowed trust relationship cannot be assumed.
B:That failure mechanism is associated with bearer token refresh and expiry. The omitted IAM STS AssumeRole cross-account protection instead causes this problem: a correct permission policy without an allowed trust relationship cannot be assumed.
C:That failure mechanism is associated with credential caching refresh. The omitted IAM STS AssumeRole cross-account protection instead causes this problem: a correct permission policy without an allowed trust relationship cannot be assumed.
Question 423
A new Lambda release must be tested while the stable production alias still resolves to the old version. Suppose the team omits the intended Lambda alias version testing safeguard. Which failure mode is the MOST direct risk of that omission?
- Testing a bare JSON object instead of an SQS event misses envelope parsing defects.
- Switching all traffic at once removes early canary detection.
- Copying production flags into staging accidentally enables functionality in the wrong environment.
- Invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions.
Explanation
Correct Answer
D:Invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions. The planned prevention is to publish immutable Lambda versions and point separate aliases to the intended tested version; the most direct verification is that calls through each alias invoke the expected immutable version and production remains stable.
Incorrect Answers
A:That failure mechanism is associated with SQS handler contract tests. The omitted Lambda alias version testing protection instead causes this problem: invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions.
B:That failure mechanism is associated with CodeDeploy Lambda canary. The omitted Lambda alias version testing protection instead causes this problem: invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions.
C:That failure mechanism is associated with environment-specific AppConfig. The omitted Lambda alias version testing protection instead causes this problem: invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions.
Question 424
A regulated client must encrypt documents before they leave its application boundary. Suppose the team omits the intended client-side versus server-side encryption safeguard. Which failure mode is the MOST direct risk of that omission?
- A backend-to-backend call can fail when identity access exists but a required resource policy denies the principal.
- Using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission.
- Deleting the KMS key during rotation makes ciphertext inaccessible after deletion.
- Logging or returning raw records before masking exposes PII despite correct database encryption.
Explanation
Correct Answer
B:Using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission. The planned prevention is to encrypt in the client with properly protected keys before uploading ciphertext to storage; the most direct verification is that network captures and storage samples contain encrypted payloads before S3 receives them.
Incorrect Answers
A:That failure mechanism is associated with service-to-service IAM authorization. The omitted client-side versus server-side encryption protection instead causes this problem: using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission.
C:That failure mechanism is associated with KMS rotation scope. The omitted client-side versus server-side encryption protection instead causes this problem: using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission.
D:That failure mechanism is associated with PII response field masking. The omitted client-side versus server-side encryption protection instead causes this problem: using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission.
Question 425
An ECS service unexpectedly runs a different build because the pipeline reuses the mutable latest tag. Suppose the team omits the intended immutable container image tags safeguard. Which failure mode is the MOST direct risk of that omission?
- A malformed template can fail deployment even if application unit tests pass.
- Editing $LATEST does not necessarily change an alias pinned to a published version.
- A mutable latest tag can point to different image bytes on separate deployments.
- Insufficient /tmp space causes disk write failures regardless of the function's available heap.
Explanation
Correct Answer
C:A mutable latest tag can point to different image bytes on separate deployments. The planned prevention is to pin deployment manifests to an immutable image digest or unique tested release tag; the most direct verification is that the running task image digest matches the tested build artifact after deployment and rollback.
Incorrect Answers
A:That failure mechanism is associated with SAM template validation. The omitted immutable container image tags protection instead causes this problem: a mutable latest tag can point to different image bytes on separate deployments.
B:That failure mechanism is associated with Lambda alias rollback. The omitted immutable container image tags protection instead causes this problem: a mutable latest tag can point to different image bytes on separate deployments.
D:That failure mechanism is associated with Lambda ephemeral disk sizing. The omitted immutable container image tags protection instead causes this problem: a mutable latest tag can point to different image bytes on separate deployments.
Question 426
A customer profile endpoint depends on a vendor scoring API with repeated timeouts. Suppose the team omits the intended third-party circuit breaker safeguard. Which failure mode is the MOST direct risk of that omission?
- A layer built for a different runtime or architecture can cause module import failures.
- Raising an exception for the whole batch makes the entire batch eligible for retry.
- Keeping all requests waiting for an unhealthy dependency exhausts caller concurrency.
- Duplicate deliveries bypass a stable deduplication check and cause the same side effect twice.
Explanation
Correct Answer
C:Keeping all requests waiting for an unhealthy dependency exhausts caller concurrency. The planned prevention is to use a circuit breaker with bounded timeouts and a documented fallback for the external dependency; the most direct verification is that during a sustained fault, calls fail fast through the fallback and recover through controlled probes.
Incorrect Answers
A:That failure mechanism is associated with Lambda layer dependency management. The omitted third-party circuit breaker protection instead causes this problem: keeping all requests waiting for an unhealthy dependency exhausts caller concurrency.
B:That failure mechanism is associated with Lambda event source partial batch response. The omitted third-party circuit breaker protection instead causes this problem: keeping all requests waiting for an unhealthy dependency exhausts caller concurrency.
D:That failure mechanism is associated with idempotent event handling. The omitted third-party circuit breaker protection instead causes this problem: keeping all requests waiting for an unhealthy dependency exhausts caller concurrency.
Question 427
A Python Lambda needs distinct API base URLs in staging and production without code forks. Suppose the team omits the intended Lambda environment configuration safeguard. Which failure mode is the MOST direct risk of that omission?
- A low-cardinality or hot partition key concentrates traffic despite available table capacity.
- Hardcoded stage URLs in application source can send production traffic to the wrong backend.
- The execution role lacks a required resource permission and AWS denies the API call.
- Unfinished multipart uploads accumulate stored parts and cannot be read as a completed object.
Explanation
Correct Answer
B:Hardcoded stage URLs in application source can send production traffic to the wrong backend. The planned prevention is to set environment-specific Lambda configuration or AWS AppConfig values and read them at runtime; the most direct verification is that invocations in each environment show the configured nonsecret value without changing application source.
Incorrect Answers
A:That failure mechanism is associated with DynamoDB partition key cardinality. The omitted Lambda environment configuration protection instead causes this problem: hardcoded stage URLs in application source can send production traffic to the wrong backend.
C:That failure mechanism is associated with Lambda execution role least privilege. The omitted Lambda environment configuration protection instead causes this problem: hardcoded stage URLs in application source can send production traffic to the wrong backend.
D:That failure mechanism is associated with S3 multipart upload recovery. The omitted Lambda environment configuration protection instead causes this problem: hardcoded stage URLs in application source can send production traffic to the wrong backend.
Question 428
An ECS container starts but should receive traffic only after its database connection pool is ready. Suppose the team omits the intended readiness versus liveness checks safeguard. Which failure mode is the MOST direct risk of that omission?
- A single strict probe for every purpose can create restart loops during transient dependency slowness.
- A longer Lambda timeout alone does not prevent an earlier API Gateway integration timeout.
- Missing trace context between calls breaks a distributed trace even when local segments exist.
- Without a filter the subscriber receives unrelated messages and spends capacity rejecting them.
Explanation
Correct Answer
A:The planned prevention is to separate liveness checks from readiness checks and return healthy only when the correct condition holds; the most direct verification is that traffic reaches only ready tasks while a temporary dependency delay does not force needless process restarts.
Incorrect Answers
B:That failure mechanism is associated with API Gateway Lambda integration timeout. The omitted readiness versus liveness checks protection instead causes this problem: a single strict probe for every purpose can create restart loops during transient dependency slowness.
C:That failure mechanism is associated with X-Ray trace propagation. The omitted readiness versus liveness checks protection instead causes this problem: a single strict probe for every purpose can create restart loops during transient dependency slowness.
D:That failure mechanism is associated with SNS subscription filter policy. The omitted readiness versus liveness checks protection instead causes this problem: a single strict probe for every purpose can create restart loops during transient dependency slowness.
Question 429
A client uploads very large video files over unstable networks and must resume failed parts. Suppose the team omits the intended S3 multipart upload recovery safeguard. Which failure mode is the MOST direct risk of that omission?
- Accepting generated code without review can introduce incorrect APIs or excessive permissions.
- Unfinished multipart uploads accumulate stored parts and cannot be read as a completed object.
- Uncontrolled shared concurrency can let a noisy function starve other executions.
- Never expiring cached entries can continue to return stale records after updates.
Explanation
Correct Answer
B:Unfinished multipart uploads accumulate stored parts and cannot be read as a completed object. The planned prevention is to use the S3 multipart upload API with part tracking and complete or abort the upload correctly; the most direct verification is that uploaded parts can be retried independently and the completed object is present only after completion.
Incorrect Answers
A:That failure mechanism is associated with Amazon Q Developer review. The omitted S3 multipart upload recovery protection instead causes this problem: unfinished multipart uploads accumulate stored parts and cannot be read as a completed object.
C:That failure mechanism is associated with Lambda concurrency reservation. The omitted S3 multipart upload recovery protection instead causes this problem: unfinished multipart uploads accumulate stored parts and cannot be read as a completed object.
D:That failure mechanism is associated with ElastiCache cache-aside. The omitted S3 multipart upload recovery protection instead causes this problem: unfinished multipart uploads accumulate stored parts and cannot be read as a completed object.
Question 430
A checkout Lambda returns occasional 500 errors and its logs include a requestId and errorCode. Suppose the team omits the intended CloudWatch Logs Insights root cause safeguard. Which failure mode is the MOST direct risk of that omission?
- Putting sensitive free-form payloads in indexed annotations creates exposure and high-cardinality filtering problems.
- Searching broad unstructured text without a request key obscures the relevant failure path.
- Optimizing only DynamoDB Query speed cannot eliminate time spent before the handler begins.
- Without a filter the subscriber receives unrelated messages and spends capacity rejecting them.
Explanation
Correct Answer
B:Searching broad unstructured text without a request key obscures the relevant failure path. The planned prevention is to query CloudWatch Logs Insights with structured fields and the request correlation identifier; the most direct verification is that the query isolates timestamps and the exact error records associated with the failed request.
Incorrect Answers
A:That failure mechanism is associated with tracing annotations versus metadata. The omitted CloudWatch Logs Insights root cause protection instead causes this problem: searching broad unstructured text without a request key obscures the relevant failure path.
C:That failure mechanism is associated with Lambda Init Duration diagnosis. The omitted CloudWatch Logs Insights root cause protection instead causes this problem: searching broad unstructured text without a request key obscures the relevant failure path.
D:That failure mechanism is associated with SNS subscription filter policy. The omitted CloudWatch Logs Insights root cause protection instead causes this problem: searching broad unstructured text without a request key obscures the relevant failure path.