AWS Certified Developer - Associate DVA-C02 Practice Test 15
Question 140
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice. Which observation is the strongest acceptance evidence?
- Compare collected resource IDs against a fixture spanning several result pages including an empty final page.
- Invoke a test API route and assert HTTP status, response headers, and parsed JSON body match the contract.
- Make a test handler run longer than the previous timeout and verify its message is not processed concurrently.
- Execute the key-based query and measure returned items and consumed capacity versus a full scan.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Make a test handler run longer than the previous timeout and verify its message is not processed concurrently. It demonstrates: SQS hides in-flight messages temporarily; expiration permits retries, and deleting early can permanently lose uncommitted work. Scenario: An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice.
Incorrect Answers
A:Option A is an acceptance test for AWS SDK paginator use: Compare collected resource IDs against a fixture spanning several result pages including an empty final page. It is not direct evidence for: An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice.
B:Option B is an acceptance test for API Gateway Lambda proxy response format: Invoke a test API route and assert HTTP status, response headers, and parsed JSON body match the contract. It is not direct evidence for: An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice.
D:Option D is an acceptance test for DynamoDB query versus scan: Execute the key-based query and measure returned items and consumed capacity versus a full scan. It is not direct evidence for: An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice.
Question 141
An engineering reviewer is evaluating service behavior and authorization boundaries. A developer blames the database for a slow call even though tracing shows most time in an external HTTP dependency. Which mechanism explains the appropriate design decision?
- Subscription filtering reduces irrelevant deliveries and downstream processing while preserving intended event fanout.
- Readiness checks prevent premature serving; liveness checks indicate whether the process should be restarted.
- A distributed trace relates individual service segments and timing to one end-to-end user request.
- Structured log fields and time filters let engineers isolate relevant exceptions rather than searching every log line manually.
Explanation
Correct Answer
C:A distributed trace relates individual service segments and timing to one end-to-end user request. This is the operating principle for X-Ray distributed trace diagnosis. Validation: Generate a test request that invokes API Gateway and Lambda and verify trace spans identify the slow call. Scenario: A developer blames the database for a slow call even though tracing shows most time in an external HTTP dependency.
Incorrect Answers
A:Option A explains SNS subscription filter policy rather than this issue: Subscription filtering reduces irrelevant deliveries and downstream processing while preserving intended event fanout. It does not explain: A developer blames the database for a slow call even though tracing shows most time in an external HTTP dependency.
B:Option B explains Readiness versus liveness health checks rather than this issue: Readiness checks prevent premature serving; liveness checks indicate whether the process should be restarted. It does not explain: A developer blames the database for a slow call even though tracing shows most time in an external HTTP dependency.
D:Option D explains CloudWatch Logs Insights fault search rather than this issue: Structured log fields and time filters let engineers isolate relevant exceptions rather than searching every log line manually. It does not explain: A developer blames the database for a slow call even though tracing shows most time in an external HTTP dependency.
Question 142
An engineering reviewer is evaluating service behavior and authorization boundaries. A reservation workflow must conditionally decrement available seats and write its booking record as one unit. Which mechanism explains the appropriate design decision?
- A proxy integration expects a defined response envelope; a plain object or inappropriate body type can cause gateway errors.
- A DynamoDB transaction commits the supported grouped writes together or rejects the entire operation.
- VPC-connected Lambda network interfaces need reachable routes and security-group permissions for database connections.
- Validation at the API boundary can reject missing required fields and unsuitable request shapes before backend code runs.
Explanation
Correct Answer
B:A DynamoDB transaction commits the supported grouped writes together or rejects the entire operation. This is the operating principle for DynamoDB transaction writes. Validation: Cause one conditional action to fail and confirm that none of the transaction's item updates persist. Scenario: A reservation workflow must conditionally decrement available seats and write its booking record as one unit.
Incorrect Answers
A:Option A explains API Gateway Lambda proxy response format rather than this issue: A proxy integration expects a defined response envelope; a plain object or inappropriate body type can cause gateway errors. It does not explain: A reservation workflow must conditionally decrement available seats and write its booking record as one unit.
C:Option C explains Lambda VPC connectivity to private data rather than this issue: VPC-connected Lambda network interfaces need reachable routes and security-group permissions for database connections. It does not explain: A reservation workflow must conditionally decrement available seats and write its booking record as one unit.
D:Option D explains API Gateway request validation rather than this issue: Validation at the API boundary can reject missing required fields and unsuitable request shapes before backend code runs. It does not explain: A reservation workflow must conditionally decrement available seats and write its booking record as one unit.
Question 143
A production readiness review identifies a potential software defect. A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever. Which implementation risk must be rejected first?
- Do not perform a blind versionless read-modify-write that overwrites another writer's more recent change.
- Do not deploy assistant-generated credentials, insecure SQL, or untested changes solely on a model recommendation.
- Do not attach an x86-compiled dependency layer to an incompatible arm64 function.
- Do not repeatedly skip failed stream events without a recovery plan or assume a failed batch cannot delay later records.
Explanation
Correct Answer
D:Do not repeatedly skip failed stream events without a recovery plan or assume a failed batch cannot delay later records. This is significant because A stream event-source mapping advances checkpoints after processing; repeated failed batches can stall progress on an affected shard. Scenario: A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (DynamoDB conditional writes): Do not perform a blind versionless read-modify-write that overwrites another writer's more recent change. It is not the key risk in: A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever.
B:Option B warns about an unrelated failure boundary (Amazon Q Developer generated code review): Do not deploy assistant-generated credentials, insecure SQL, or untested changes solely on a model recommendation. It is not the key risk in: A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever.
C:Option C warns about an unrelated failure boundary (Lambda layers and runtime dependency packaging): Do not attach an x86-compiled dependency layer to an incompatible arm64 function. It is not the key risk in: A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever.
Question 144
A production readiness review identifies a potential software defect. A rewards transfer debits one wallet but crashes before crediting the recipient. Which implementation risk must be rejected first?
- Do not use one constant tenant key for a workload that writes massive traffic under a single partition.
- Do not split a logically atomic credit-and-debit update into unrelated best-effort PutItem calls.
- Do not retry malformed requests indefinitely or synchronize thousands of clients into a retry storm.
- Do not delete a queue item before its database transaction commits or set the visibility timeout shorter than routine processing.
Explanation
Correct Answer
B:Do not split a logically atomic credit-and-debit update into unrelated best-effort PutItem calls. This is significant because A DynamoDB transaction commits the supported grouped writes together or rejects the entire operation. Scenario: A rewards transfer debits one wallet but crashes before crediting the recipient.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (DynamoDB partition key hot spots): Do not use one constant tenant key for a workload that writes massive traffic under a single partition. It is not the key risk in: A rewards transfer debits one wallet but crashes before crediting the recipient.
C:Option C warns about an unrelated failure boundary (Third-party API retries with jitter): Do not retry malformed requests indefinitely or synchronize thousands of clients into a retry storm. It is not the key risk in: A rewards transfer debits one wallet but crashes before crediting the recipient.
D:Option D warns about an unrelated failure boundary (SQS visibility timeout and retries): Do not delete a queue item before its database transaction commits or set the visibility timeout shorter than routine processing. It is not the key risk in: A rewards transfer debits one wallet but crashes before crediting the recipient.
Question 145
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. An API produces intermittent 500 errors but developers scan all log groups without matching the request ID. Which observation is the strongest acceptance evidence?
- Invoke repeated identical safe GETs and verify reduced backend calls without serving another user's response.
- Send a synthetic failed-checkout metric and confirm its namespace, dimension, and value are queryable.
- Trigger a safe known error then query its request ID and confirm the exception and affected service appear.
- Publish a controlled failure metric and confirm the alarm changes state and the intended SNS subscriber receives it.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Trigger a safe known error then query its request ID and confirm the exception and affected service appear. It demonstrates: Structured log fields and time filters let engineers isolate relevant exceptions rather than searching every log line manually. Scenario: An API produces intermittent 500 errors but developers scan all log groups without matching the request ID.
Incorrect Answers
A:Option A is an acceptance test for API Gateway response caching: Invoke repeated identical safe GETs and verify reduced backend calls without serving another user's response. It is not direct evidence for: An API produces intermittent 500 errors but developers scan all log groups without matching the request ID.
B:Option B is an acceptance test for CloudWatch embedded metric format: Send a synthetic failed-checkout metric and confirm its namespace, dimension, and value are queryable. It is not direct evidence for: An API produces intermittent 500 errors but developers scan all log groups without matching the request ID.
D:Option D is an acceptance test for CloudWatch alarm notification: Publish a controlled failure metric and confirm the alarm changes state and the intended SNS subscriber receives it. It is not direct evidence for: An API produces intermittent 500 errors but developers scan all log groups without matching the request ID.
Question 146
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A team applies an AdministratorAccess policy to an application role despite a boundary prohibiting IAM role changes. Which observation is the strongest acceptance evidence?
- Upload a synthetic encrypted file and verify only a holder of the application key can reconstruct its plaintext.
- Connect to the configured custom domain and inspect hostname matching, chain trust, and expected renewal state.
- Attach an excessive policy to a bounded test role and show a forbidden action is still denied.
- Invoke a test function and verify a sensitive value is never emitted in its response or CloudWatch logs.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Attach an excessive policy to a bounded test role and show a forbidden action is still denied. It demonstrates: An IAM permissions boundary limits the permissions the identity policy can grant; it does not grant permissions by itself. Scenario: A team applies an AdministratorAccess policy to an application role despite a boundary prohibiting IAM role changes.
Incorrect Answers
A:Option A is an acceptance test for Client-side versus server-side encryption boundary: Upload a synthetic encrypted file and verify only a holder of the application key can reconstruct its plaintext. It is not direct evidence for: A team applies an AdministratorAccess policy to an application role despite a boundary prohibiting IAM role changes.
B:Option B is an acceptance test for AWS Certificate Manager HTTPS certificate binding: Connect to the configured custom domain and inspect hostname matching, chain trust, and expected renewal state. It is not direct evidence for: A team applies an AdministratorAccess policy to an application role despite a boundary prohibiting IAM role changes.
D:Option D is an acceptance test for Secrets in Lambda environment variables: Invoke a test function and verify a sensitive value is never emitted in its response or CloudWatch logs. It is not direct evidence for: A team applies an AdministratorAccess policy to an application role despite a boundary prohibiting IAM role changes.
Question 147
An AWS developer is reviewing the next application release. A developer raises Lambda memory substantially and assumes the new configuration is always cheaper without benchmarks. Which technical change most directly meets the requirement?
- Apply a tracing sampling configuration that retains useful diagnostic coverage without excessive overhead or sensitive fields.
- Configure a CloudFront cache policy that includes only request headers required to vary a response.
- Profile Lambda memory, duration, init time, and total per-invocation cost before choosing a power setting.
- Emit valid CloudWatch Embedded Metric Format log objects for business-level custom metrics.
Explanation
Correct Answer
C:Memory setting changes the available CPU budget and can reduce billed duration enough to offset its higher per-time cost. Apply: Profile Lambda memory, duration, init time, and total per-invocation cost before choosing a power setting. Acceptance check: Benchmark fixed representative input across several memory configurations and compare p95 duration and unit cost. Scenario: A developer raises Lambda memory substantially and assumes the new configuration is always cheaper without benchmarks.
Incorrect Answers
A:Option A implements a different developer control (App-level trace sampling and privacy): Apply a tracing sampling configuration that retains useful diagnostic coverage without excessive overhead or sensitive fields. That does not resolve the specific situation: A developer raises Lambda memory substantially and assumes the new configuration is always cheaper without benchmarks.
B:Option B implements a different developer control (CloudFront caching by request headers): Configure a CloudFront cache policy that includes only request headers required to vary a response. That does not resolve the specific situation: A developer raises Lambda memory substantially and assumes the new configuration is always cheaper without benchmarks.
D:Option D implements a different developer control (CloudWatch embedded metric format): Emit valid CloudWatch Embedded Metric Format log objects for business-level custom metrics. That does not resolve the specific situation: A developer raises Lambda memory substantially and assumes the new configuration is always cheaper without benchmarks.
Question 148
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A web app embeds a permanent IAM key to write profile images directly to a private S3 bucket. What test most directly confirms the intended behavior?
- Sign in as an authenticated test user and verify their temporary AWS credentials can reach only the expected S3 resources.
- Upload a test encrypted object and confirm a role without kms:Decrypt cannot read it while an approved role can.
- Scan a sample deployment artifact and prove no plaintext secret keys remain while authorized decryption still works.
- Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Sign in as an authenticated test user and verify their temporary AWS credentials can reach only the expected S3 resources. It demonstrates: Identity pools support federated identities receiving temporary roles, distinct from user-pool authentication token issuance. Scenario: A web app embeds a permanent IAM key to write profile images directly to a private S3 bucket.
Incorrect Answers
B:Option B is an acceptance test for S3 SSE-KMS encryption key access: Upload a test encrypted object and confirm a role without kms:Decrypt cannot read it while an approved role can. It is not direct evidence for: A web app embeds a permanent IAM key to write profile images directly to a private S3 bucket.
C:Option C is an acceptance test for Encryption key in application config: Scan a sample deployment artifact and prove no plaintext secret keys remain while authorized decryption still works. It is not direct evidence for: A web app embeds a permanent IAM key to write profile images directly to a private S3 bucket.
D:Option D is an acceptance test for Cognito bearer-token expiry and refresh: Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates. It is not direct evidence for: A web app embeds a permanent IAM key to write profile images directly to a private S3 bucket.
Question 149
A development team must select an AWS application change. A rewards transfer debits one wallet but crashes before crediting the recipient. Which implementation best addresses this situation?
- Use DynamoDB TransactWriteItems to apply a small set of related item changes atomically when the transaction limits permit.
- Serialize application objects with explicit schema, numeric types, and timestamp handling before writing to a data store.
- Define per-environment Lambda environment variables for nonsecret configuration and use managed secret retrieval for credentials.
- Use a strongly consistent read on a supported DynamoDB table or local secondary index when immediate read-after-write is required.
Explanation
Correct Answer
A:A DynamoDB transaction commits the supported grouped writes together or rejects the entire operation. Apply: Use DynamoDB TransactWriteItems to apply a small set of related item changes atomically when the transaction limits permit. Acceptance check: Cause one conditional action to fail and confirm that none of the transaction's item updates persist. Scenario: A rewards transfer debits one wallet but crashes before crediting the recipient.
Incorrect Answers
B:Option B implements a different developer control (Application-level JSON serialization): Serialize application objects with explicit schema, numeric types, and timestamp handling before writing to a data store. That does not resolve the specific situation: A rewards transfer debits one wallet but crashes before crediting the recipient.
C:Option C implements a different developer control (Lambda environment configuration): Define per-environment Lambda environment variables for nonsecret configuration and use managed secret retrieval for credentials. That does not resolve the specific situation: A rewards transfer debits one wallet but crashes before crediting the recipient.
D:Option D implements a different developer control (DynamoDB strong read consistency): Use a strongly consistent read on a supported DynamoDB table or local secondary index when immediate read-after-write is required. That does not resolve the specific situation: A rewards transfer debits one wallet but crashes before crediting the recipient.
Question 150
A cloud developer must explain the mechanism behind a proposed solution. A new event worker produces duplicate refunds when test messages are redelivered after timeouts. Which technical explanation correctly accounts for the solution?
- A pipeline approval action prevents production promotion until a permitted reviewer approves the exact tested revision.
- A fixture exercises the exact envelope the event source sends, including metadata and nested record structures.
- Blue-green release keeps a known environment available while traffic moves to the tested replacement.
- Asynchronous systems can retry, reorder, or redeliver messages; the integration contract must handle these cases safely.
Explanation
Correct Answer
D:Asynchronous systems can retry, reorder, or redeliver messages; the integration contract must handle these cases safely. This is the operating principle for Event-driven integration test cases. Validation: Send a controlled duplicate event and a bad record and verify idempotent state and planned retry behavior. Scenario: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
Incorrect Answers
A:Option A explains CodePipeline cross-stage approval rather than this issue: A pipeline approval action prevents production promotion until a permitted reviewer approves the exact tested revision. It does not explain: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
B:Option B explains Test Lambda JSON event fixture rather than this issue: A fixture exercises the exact envelope the event source sends, including metadata and nested record structures. It does not explain: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
C:Option C explains CodeDeploy blue-green rollback rather than this issue: Blue-green release keeps a known environment available while traffic moves to the tested replacement. It does not explain: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.