AWS Certified Developer - Associate DVA-C02 Practice Test 21
Question 200
An AWS developer is reviewing the next application release. A vendor's integration assumes a shared role even though the role trust includes unapproved principals. Which technical change most directly meets the requirement?
- Configure an API Gateway JWT authorizer that enforces the expected issuer, audience, and route-specific scopes.
- Use a supported KMS data key and encrypt large application payloads locally with a data encryption algorithm.
- Select client-side encryption when payload confidentiality must be enforced before data reaches the AWS service endpoint.
- Use STS AssumeRole with explicit cross-account trust and a permission policy granting only the required resource access.
Explanation
Correct Answer
D:The trusted calling principal and assumed role permissions are distinct authorization checks for cross-account access. Apply: Use STS AssumeRole with explicit cross-account trust and a permission policy granting only the required resource access. Acceptance check: Try assuming the role from an allowed account and an unauthorized account and compare resulting session permissions. Scenario: A vendor's integration assumes a shared role even though the role trust includes unapproved principals.
Incorrect Answers
A:Option A implements a different developer control (API Gateway JWT authorizer scope): Configure an API Gateway JWT authorizer that enforces the expected issuer, audience, and route-specific scopes. That does not resolve the specific situation: A vendor's integration assumes a shared role even though the role trust includes unapproved principals.
B:Option B implements a different developer control (KMS envelope encryption pattern): Use a supported KMS data key and encrypt large application payloads locally with a data encryption algorithm. That does not resolve the specific situation: A vendor's integration assumes a shared role even though the role trust includes unapproved principals.
C:Option C implements a different developer control (Client-side versus server-side encryption boundary): Select client-side encryption when payload confidentiality must be enforced before data reaches the AWS service endpoint. That does not resolve the specific situation: A vendor's integration assumes a shared role even though the role trust includes unapproved principals.
Question 201
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A SaaS backend queries an order by supplied orderId and exposes a different customer's order. Which observation is the strongest acceptance evidence?
- Connect to a trusted endpoint and deliberately invalid certificate and verify the invalid peer is rejected.
- Call the same endpoint with a support role and customer role and assert restricted fields are absent from the lesser role's payload.
- Invoke the same API with two customer identities and verify neither can retrieve the other's object identifiers.
- Invoke a safe state machine with and without required task permission and confirm the specific service action fails narrowly.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Invoke the same API with two customer identities and verify neither can retrieve the other's object identifiers. It demonstrates: AWS IAM service permission may authorize a Lambda to read the table but does not automatically enforce end-user tenant boundaries. Scenario: A SaaS backend queries an order by supplied orderId and exposes a different customer's order.
Incorrect Answers
A:Option A is an acceptance test for TLS server identity validation: Connect to a trusted endpoint and deliberately invalid certificate and verify the invalid peer is rejected. It is not direct evidence for: A SaaS backend queries an order by supplied orderId and exposes a different customer's order.
B:Option B is an acceptance test for Sensitive data classification before API responses: Call the same endpoint with a support role and customer role and assert restricted fields are absent from the lesser role's payload. It is not direct evidence for: A SaaS backend queries an order by supplied orderId and exposes a different customer's order.
D:Option D is an acceptance test for Cross-service execution role in Step Functions: Invoke a safe state machine with and without required task permission and confirm the specific service action fails narrowly. It is not direct evidence for: A SaaS backend queries an order by supplied orderId and exposes a different customer's order.
Question 202
A cloud developer must explain the mechanism behind a proposed solution. A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections. Which technical explanation correctly accounts for the solution?
- A state machine preserves workflow state across service calls and makes ordered dependencies and failures observable.
- Reserved concurrency sets a function-level execution ceiling, protecting a constrained target from fanout spikes.
- AI-generated suggestions are proposed source changes, not verified runtime behavior or authorization proof.
- A DynamoDB transaction commits the supported grouped writes together or rejects the entire operation.
Explanation
Correct Answer
B:Reserved concurrency sets a function-level execution ceiling, protecting a constrained target from fanout spikes. This is the operating principle for Lambda reserved concurrency. Validation: Send a burst of test invocations and confirm concurrent executions remain below the database connection threshold. Scenario: A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections.
Incorrect Answers
A:Option A explains Step Functions orchestration rather than this issue: A state machine preserves workflow state across service calls and makes ordered dependencies and failures observable. It does not explain: A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections.
C:Option C explains Amazon Q Developer generated code review rather than this issue: AI-generated suggestions are proposed source changes, not verified runtime behavior or authorization proof. It does not explain: A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections.
D:Option D explains DynamoDB transaction writes rather than this issue: A DynamoDB transaction commits the supported grouped writes together or rejects the entire operation. It does not explain: A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections.
Question 203
A cloud developer must explain the mechanism behind a proposed solution. One region's integration stack works but another fails because its manually created IAM role is missing permissions. Which technical explanation correctly accounts for the solution?
- AppConfig separates runtime configuration and progressive rollout from application binary releases.
- Separate API stages let developers exercise route changes without directing tests at production functions and data.
- Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts.
- Infrastructure as code allows the same resource relationships to be tested consistently rather than created manually.
Explanation
Correct Answer
D:Infrastructure as code allows the same resource relationships to be tested consistently rather than created manually. This is the operating principle for Deploy test environment with CloudFormation. Validation: Launch a new test stack and compare its logical resources and configured permissions with the reviewed template. Scenario: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
Incorrect Answers
A:Option A explains AppConfig environment feature flags rather than this issue: AppConfig separates runtime configuration and progressive rollout from application binary releases. It does not explain: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
B:Option B explains API Gateway staging endpoint verification rather than this issue: Separate API stages let developers exercise route changes without directing tests at production functions and data. It does not explain: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
C:Option C explains CodeBuild integration test environment rather than this issue: Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts. It does not explain: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
Question 204
An AWS developer is reviewing the next application release. A regional service uses a certificate requested in an incompatible AWS Region for the gateway endpoint. Which technical change most directly meets the requirement?
- Configure an API Gateway JWT authorizer that enforces the expected issuer, audience, and route-specific scopes.
- Handle short-lived application access tokens and controlled refresh without reusing an expired bearer token indefinitely.
- Enforce tenant identity and resource ownership inside application authorization logic before returning any row or object.
- Attach an ACM-managed certificate matching the custom domain to the intended supported API or load balancer endpoint.
Explanation
Correct Answer
D:A TLS certificate's domain names and issuance or region constraints must match the client-visible service endpoint. Apply: Attach an ACM-managed certificate matching the custom domain to the intended supported API or load balancer endpoint. Acceptance check: Connect to the configured custom domain and inspect hostname matching, chain trust, and expected renewal state. Scenario: A regional service uses a certificate requested in an incompatible AWS Region for the gateway endpoint.
Incorrect Answers
A:Option A implements a different developer control (API Gateway JWT authorizer scope): Configure an API Gateway JWT authorizer that enforces the expected issuer, audience, and route-specific scopes. That does not resolve the specific situation: A regional service uses a certificate requested in an incompatible AWS Region for the gateway endpoint.
B:Option B implements a different developer control (Cognito bearer-token expiry and refresh): Handle short-lived application access tokens and controlled refresh without reusing an expired bearer token indefinitely. That does not resolve the specific situation: A regional service uses a certificate requested in an incompatible AWS Region for the gateway endpoint.
C:Option C implements a different developer control (Fine-grained application tenant authorization): Enforce tenant identity and resource ownership inside application authorization logic before returning any row or object. That does not resolve the specific situation: A regional service uses a certificate requested in an incompatible AWS Region for the gateway endpoint.
Question 205
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A public read token can invoke an administrative write API because the route lacks a scope condition. Which observation is the strongest acceptance evidence?
- Encrypt and decrypt a synthetic large payload while verifying encrypted data keys, authorization, and key handling.
- Request another tenant's document using a forged URL parameter and confirm it is rejected before data retrieval.
- Submit valid, expired, and wrong-client tokens and verify only the intended token is accepted by the backend.
- Send a token with a valid signature but missing the required scope and confirm the route rejects it.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Send a token with a valid signature but missing the required scope and confirm the route rejects it. It demonstrates: JWT authorizers check token metadata and claims before invoking protected API routes. Scenario: A public read token can invoke an administrative write API because the route lacks a scope condition.
Incorrect Answers
A:Option A is an acceptance test for KMS envelope encryption pattern: Encrypt and decrypt a synthetic large payload while verifying encrypted data keys, authorization, and key handling. It is not direct evidence for: A public read token can invoke an administrative write API because the route lacks a scope condition.
B:Option B is an acceptance test for Multi-tenant partitioning guard: Request another tenant's document using a forged URL parameter and confirm it is rejected before data retrieval. It is not direct evidence for: A public read token can invoke an administrative write API because the route lacks a scope condition.
C:Option C is an acceptance test for Cognito user-pool login tokens: Submit valid, expired, and wrong-client tokens and verify only the intended token is accepted by the backend. It is not direct evidence for: A public read token can invoke an administrative write API because the route lacks a scope condition.
Question 206
A cloud developer must explain the mechanism behind a proposed solution. An image converter runs three times slower with 128 MB despite having spare account concurrency. Which technical explanation correctly accounts for the solution?
- Memory setting changes the available CPU budget and can reduce billed duration enough to offset its higher per-time cost.
- Sampling limits tracing volume while secure context propagation and data minimization preserve observability integrity.
- A distributed trace relates individual service segments and timing to one end-to-end user request.
- A cache key built from relevant path, query, cookies, and headers separates content variants without fragmenting the cache unnecessarily.
Explanation
Correct Answer
A:Memory setting changes the available CPU budget and can reduce billed duration enough to offset its higher per-time cost. This is the operating principle for Lambda performance memory cost tuning. Validation: Benchmark fixed representative input across several memory configurations and compare p95 duration and unit cost. Scenario: An image converter runs three times slower with 128 MB despite having spare account concurrency.
Incorrect Answers
B:Option B explains App-level trace sampling and privacy rather than this issue: Sampling limits tracing volume while secure context propagation and data minimization preserve observability integrity. It does not explain: An image converter runs three times slower with 128 MB despite having spare account concurrency.
C:Option C explains X-Ray distributed trace diagnosis rather than this issue: A distributed trace relates individual service segments and timing to one end-to-end user request. It does not explain: An image converter runs three times slower with 128 MB despite having spare account concurrency.
D:Option D explains CloudFront caching by request headers rather than this issue: A cache key built from relevant path, query, cookies, and headers separates content variants without fragmenting the cache unnecessarily. It does not explain: An image converter runs three times slower with 128 MB despite having spare account concurrency.
Question 207
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A payment feature must be turned off within minutes without rebuilding the Lambda function. Which observation is the strongest acceptance evidence?
- Induce a failing readiness test in the new environment and verify routing returns to the previous one.
- Run a fixture representing missing and valid fields and assert deterministic output and error handling.
- Publish a staging configuration with a forced alarm and verify rollback restores the former configuration version.
- Enable a test flag only in staging and confirm production's flag stays unchanged during rollback.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Enable a test flag only in staging and confirm production's flag stays unchanged during rollback. It demonstrates: AppConfig separates runtime configuration and progressive rollout from application binary releases. Scenario: A payment feature must be turned off within minutes without rebuilding the Lambda function.
Incorrect Answers
A:Option A is an acceptance test for CodeDeploy blue-green rollback: Induce a failing readiness test in the new environment and verify routing returns to the previous one. It is not direct evidence for: A payment feature must be turned off within minutes without rebuilding the Lambda function.
B:Option B is an acceptance test for SAM local unit tests and mocks: Run a fixture representing missing and valid fields and assert deterministic output and error handling. It is not direct evidence for: A payment feature must be turned off within minutes without rebuilding the Lambda function.
C:Option C is an acceptance test for AppConfig progressive rollout rollback: Publish a staging configuration with a forced alarm and verify rollback restores the former configuration version. It is not direct evidence for: A payment feature must be turned off within minutes without rebuilding the Lambda function.
Question 208
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. An API cache has almost no hits because its cache key includes a unique tracing header for every request. What test most directly confirms the intended behavior?
- Request two localized response variants and verify correct cache behavior and cache-hit improvements.
- Generate a test request that invokes API Gateway and Lambda and verify trace spans identify the slow call.
- Start a test container with a delayed dependency and confirm routing waits for readiness without unnecessary restart loops.
- Generate an error request and query by correlation ID while verifying PII and tokens were removed.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Request two localized response variants and verify correct cache behavior and cache-hit improvements. It demonstrates: A cache key built from relevant path, query, cookies, and headers separates content variants without fragmenting the cache unnecessarily. Scenario: An API cache has almost no hits because its cache key includes a unique tracing header for every request.
Incorrect Answers
B:Option B is an acceptance test for X-Ray distributed trace diagnosis: Generate a test request that invokes API Gateway and Lambda and verify trace spans identify the slow call. It is not direct evidence for: An API cache has almost no hits because its cache key includes a unique tracing header for every request.
C:Option C is an acceptance test for Readiness versus liveness health checks: Start a test container with a delayed dependency and confirm routing waits for readiness without unnecessary restart loops. It is not direct evidence for: An API cache has almost no hits because its cache key includes a unique tracing header for every request.
D:Option D is an acceptance test for Structured JSON application logging: Generate an error request and query by correlation ID while verifying PII and tokens were removed. It is not direct evidence for: An API cache has almost no hits because its cache key includes a unique tracing header for every request.
Question 209
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A service role was granted S3 access yet its KMS key policy was never updated during a migration. What test most directly confirms the intended behavior?
- Send a token with a valid signature but missing the required scope and confirm the route rejects it.
- Assume the application role from a test workload and confirm only the required AWS API actions succeed.
- Assume a test role and verify decrypt fails before authorization and succeeds only after the approved key-access path exists.
- Send a properly signed request and a tampered payload with unchanged signature and verify the latter is rejected.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Assume a test role and verify decrypt fails before authorization and succeeds only after the approved key-access path exists. It demonstrates: KMS authorization evaluates key resource policies and grants alongside caller identity permissions, subject to explicit denies. Scenario: A service role was granted S3 access yet its KMS key policy was never updated during a migration.
Incorrect Answers
A:Option A is an acceptance test for API Gateway JWT authorizer scope: Send a token with a valid signature but missing the required scope and confirm the route rejects it. It is not direct evidence for: A service role was granted S3 access yet its KMS key policy was never updated during a migration.
B:Option B is an acceptance test for IAM assumed role for workload: Assume the application role from a test workload and confirm only the required AWS API actions succeed. It is not direct evidence for: A service role was granted S3 access yet its KMS key policy was never updated during a migration.
D:Option D is an acceptance test for SigV4 request signing: Send a properly signed request and a tampered payload with unchanged signature and verify the latter is rejected. It is not direct evidence for: A service role was granted S3 access yet its KMS key policy was never updated during a migration.
Question 210
An engineering reviewer is evaluating service behavior and authorization boundaries. A telemetry producer uses one partition key for an entire country and overloads one shard despite idle capacity. Which mechanism explains the appropriate design decision?
- Validation at the API boundary can reject missing required fields and unsuitable request shapes before backend code runs.
- Kinesis Data Streams orders records within a shard; a partition key controls how related records are grouped.
- Caching reduces repeated backend reads but creates a freshness boundary determined by expiration and explicit invalidation.
- EventBridge evaluates structured event fields before dispatching to a selected target, unlike a time-based scheduler.
Explanation
Correct Answer
B:Kinesis Data Streams orders records within a shard; a partition key controls how related records are grouped. This is the operating principle for Kinesis per-shard ordering. Validation: Publish ordered updates for two account IDs and verify each account's local sequence is processed consistently. Scenario: A telemetry producer uses one partition key for an entire country and overloads one shard despite idle capacity.
Incorrect Answers
A:Option A 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 telemetry producer uses one partition key for an entire country and overloads one shard despite idle capacity.
C:Option C explains ElastiCache read-through cache rather than this issue: Caching reduces repeated backend reads but creates a freshness boundary determined by expiration and explicit invalidation. It does not explain: A telemetry producer uses one partition key for an entire country and overloads one shard despite idle capacity.
D:Option D explains EventBridge content-based routing rather than this issue: EventBridge evaluates structured event fields before dispatching to a selected target, unlike a time-based scheduler. It does not explain: A telemetry producer uses one partition key for an entire country and overloads one shard despite idle capacity.