AWS Certified Developer - Associate DVA-C02 Practice Test 38
Question 370
A development team must select an AWS application change. A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh. Which implementation best addresses this situation?
- Apply the required permissions boundary and identity policy so a developer-created execution role cannot exceed its maximum allowed privileges.
- Protect sensitive S3 objects with a customer-managed KMS key and authorize needed encrypt and decrypt operations to the exact workload role.
- Attach an ACM-managed certificate matching the custom domain to the intended supported API or load balancer endpoint.
- Handle short-lived application access tokens and controlled refresh without reusing an expired bearer token indefinitely.
Explanation
Correct Answer
D:Access tokens have bounded validity, and refresh flows must respect revocation and client configuration. Apply: Handle short-lived application access tokens and controlled refresh without reusing an expired bearer token indefinitely. Acceptance check: Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates. Scenario: A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh.
Incorrect Answers
A:Option A implements a different developer control (IAM permission boundary intersection): Apply the required permissions boundary and identity policy so a developer-created execution role cannot exceed its maximum allowed privileges. That does not resolve the specific situation: A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh.
B:Option B implements a different developer control (S3 SSE-KMS encryption key access): Protect sensitive S3 objects with a customer-managed KMS key and authorize needed encrypt and decrypt operations to the exact workload role. That does not resolve the specific situation: A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh.
C:Option C implements a different developer control (AWS Certificate Manager HTTPS certificate binding): Attach an ACM-managed certificate matching the custom domain to the intended supported API or load balancer endpoint. That does not resolve the specific situation: A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh.
Question 371
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A user guesses another tenant's invoice key and receives its private attachment even with a valid login token. What test most directly confirms the intended behavior?
- Connect to a trusted endpoint and deliberately invalid certificate and verify the invalid peer is rejected.
- Fetch a test SecureString from the approved role and confirm a read-only unrelated role cannot decrypt it.
- Invoke the same API with two customer identities and verify neither can retrieve the other's object identifiers.
- Encrypt and decrypt a synthetic large payload while verifying encrypted data keys, authorization, and key handling.
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 user guesses another tenant's invoice key and receives its private attachment even with a valid login token.
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 user guesses another tenant's invoice key and receives its private attachment even with a valid login token.
B:Option B is an acceptance test for AWS Systems Manager Parameter Store secure strings: Fetch a test SecureString from the approved role and confirm a read-only unrelated role cannot decrypt it. It is not direct evidence for: A user guesses another tenant's invoice key and receives its private attachment even with a valid login token.
D:Option D 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 user guesses another tenant's invoice key and receives its private attachment even with a valid login token.
Question 372
An AWS developer is reviewing the next application release. A function adds complete cardholder identifiers to trace annotations to simplify searching. Which technical change most directly meets the requirement?
- Cache expensive hot reads with a defined TTL and invalidate affected keys after underlying writes.
- Correlate a failed AWS API call with CloudTrail event fields and IAM evaluation to locate missing action or resource authorization.
- Attach appropriately bounded X-Ray annotations to selected segments so investigators can filter traces by safe business dimensions.
- Inspect source queue receive counts and dead-letter queue payloads to identify repeatedly failing consumer messages.
Explanation
Correct Answer
C:Indexed annotations support filtering traces by defined key-value pairs while metadata can hold less indexed detail. Apply: Attach appropriately bounded X-Ray annotations to selected segments so investigators can filter traces by safe business dimensions. Acceptance check: Emit traces with safe test tenant identifiers and synthetic sensitive data; verify useful filtering works while confidential identifiers are excluded from annotations. Scenario: A function adds complete cardholder identifiers to trace annotations to simplify searching.
Incorrect Answers
A:Option A implements a different developer control (ElastiCache invalidation and TTL): Cache expensive hot reads with a defined TTL and invalidate affected keys after underlying writes. That does not resolve the specific situation: A function adds complete cardholder identifiers to trace annotations to simplify searching.
B:Option B implements a different developer control (IAM AccessDenied CloudTrail triage): Correlate a failed AWS API call with CloudTrail event fields and IAM evaluation to locate missing action or resource authorization. That does not resolve the specific situation: A function adds complete cardholder identifiers to trace annotations to simplify searching.
D:Option D implements a different developer control (SQS DLQ and receive-count troubleshooting): Inspect source queue receive counts and dead-letter queue payloads to identify repeatedly failing consumer messages. That does not resolve the specific situation: A function adds complete cardholder identifiers to trace annotations to simplify searching.
Question 373
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A batch API experiences a high error rate for an hour with no notification despite CloudWatch metrics existing. Which observation is the strongest acceptance evidence?
- Reproduce a denied test call and identify the principal, attempted API action, resource, and denial context.
- Emit traces with safe test tenant identifiers and synthetic sensitive data; verify useful filtering works while confidential identifiers are excluded from annotations.
- Send a synthetic failed-checkout metric and confirm its namespace, dimension, and value are queryable.
- Publish a controlled failure metric and confirm the alarm changes state and the intended SNS subscriber receives it.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Publish a controlled failure metric and confirm the alarm changes state and the intended SNS subscriber receives it. It demonstrates: Alarm evaluation periods and action destinations translate monitored metrics into timely incident notifications. Scenario: A batch API experiences a high error rate for an hour with no notification despite CloudWatch metrics existing.
Incorrect Answers
A:Option A is an acceptance test for IAM AccessDenied CloudTrail triage: Reproduce a denied test call and identify the principal, attempted API action, resource, and denial context. It is not direct evidence for: A batch API experiences a high error rate for an hour with no notification despite CloudWatch metrics existing.
B:Option B is an acceptance test for X-Ray trace annotations: Emit traces with safe test tenant identifiers and synthetic sensitive data; verify useful filtering works while confidential identifiers are excluded from annotations. It is not direct evidence for: A batch API experiences a high error rate for an hour with no notification despite CloudWatch metrics existing.
C:Option C 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: A batch API experiences a high error rate for an hour with no notification despite CloudWatch metrics existing.
Question 374
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A checkout API emits dozens of unstructured strings but support cannot correlate one failed purchase across functions. Which observation is the strongest acceptance evidence?
- Generate repeated traceable requests and confirm sampled segments include correlation but not secrets.
- Publish a controlled failure metric and confirm the alarm changes state and the intended SNS subscriber receives it.
- 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
D:The decisive acceptance evidence is: Generate an error request and query by correlation ID while verifying PII and tokens were removed. It demonstrates: Machine-readable fields support consistent filtering and cross-service incident timelines without exposing secrets. Scenario: A checkout API emits dozens of unstructured strings but support cannot correlate one failed purchase across functions.
Incorrect Answers
A:Option A is an acceptance test for App-level trace sampling and privacy: Generate repeated traceable requests and confirm sampled segments include correlation but not secrets. It is not direct evidence for: A checkout API emits dozens of unstructured strings but support cannot correlate one failed purchase across functions.
B:Option B 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: A checkout API emits dozens of unstructured strings but support cannot correlate one failed purchase across functions.
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: A checkout API emits dozens of unstructured strings but support cannot correlate one failed purchase across functions.
Question 375
A cloud developer must explain the mechanism behind a proposed solution. A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh. Which technical explanation correctly accounts for the solution?
- Application secrets should have controlled retrieval, audit, and rotation rather than appearing in plaintext code or build artifacts.
- Identity claims determine tenant authorization independently of which resource key a user guesses or sends in a URL.
- Access tokens have bounded validity, and refresh flows must respect revocation and client configuration.
- Hardcoded encryption keys are copied into builds and cannot be centrally rotated or permission-scoped safely.
Explanation
Correct Answer
C:Access tokens have bounded validity, and refresh flows must respect revocation and client configuration. This is the operating principle for Cognito bearer-token expiry and refresh. Validation: Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates. Scenario: A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh.
Incorrect Answers
A:Option A explains Secrets in Lambda environment variables rather than this issue: Application secrets should have controlled retrieval, audit, and rotation rather than appearing in plaintext code or build artifacts. It does not explain: A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh.
B:Option B explains Multi-tenant partitioning guard rather than this issue: Identity claims determine tenant authorization independently of which resource key a user guesses or sends in a URL. It does not explain: A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh.
D:Option D explains Encryption key in application config rather than this issue: Hardcoded encryption keys are copied into builds and cannot be centrally rotated or permission-scoped safely. It does not explain: A mobile client works at login but receives HTTP 401 after an hour and never attempts refresh.
Question 376
An engineering reviewer is evaluating service behavior and authorization boundaries. The release pipeline signs off an image in test but rebuilds dependencies again before deploying to production. Which mechanism explains the appropriate design decision?
- CodeDeploy can send a limited share of traffic to a new version and shift more only after healthy checks.
- Lambda ZIP handlers and imported libraries must exist in locations the configured runtime can load at initialization.
- A source-stage revision ties pipeline execution to the exact code and branch used in that release.
- Immutable image tags or digests help ensure test and production run exactly the reviewed code and package versions.
Explanation
Correct Answer
D:Immutable image tags or digests help ensure test and production run exactly the reviewed code and package versions. This is the operating principle for Container image dependency pinning. Validation: Build a test image, inspect its digest, and deploy that exact digest to staging before production promotion. Scenario: The release pipeline signs off an image in test but rebuilds dependencies again before deploying to production.
Incorrect Answers
A:Option A explains CodeDeploy canary Lambda traffic shifting rather than this issue: CodeDeploy can send a limited share of traffic to a new version and shift more only after healthy checks. It does not explain: The release pipeline signs off an image in test but rebuilds dependencies again before deploying to production.
B:Option B explains Lambda dependency archive packaging rather than this issue: Lambda ZIP handlers and imported libraries must exist in locations the configured runtime can load at initialization. It does not explain: The release pipeline signs off an image in test but rebuilds dependencies again before deploying to production.
C:Option C explains CodePipeline source change trigger rather than this issue: A source-stage revision ties pipeline execution to the exact code and branch used in that release. It does not explain: The release pipeline signs off an image in test but rebuilds dependencies again before deploying to production.
Question 377
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 reads the same public catalog metadata for each user and unnecessarily invokes Lambda every time. Which observation is the strongest acceptance evidence?
- Invoke a malformed request and a forced Lambda error and verify status, request ID, and integration log differences.
- Invoke repeated identical safe GETs and verify reduced backend calls without serving another user's response.
- Reproduce a missing-layer import fault and a slow handler separately and compare logged phase and error signatures.
- Generate a test request that invokes API Gateway and Lambda and verify trace spans identify the slow call.
Explanation
Correct Answer
B:The decisive acceptance evidence is: Invoke repeated identical safe GETs and verify reduced backend calls without serving another user's response. It demonstrates: API caching reduces repeated backend invocations for cacheable requests but must vary by identity or parameters when data differs. Scenario: An API reads the same public catalog metadata for each user and unnecessarily invokes Lambda every time.
Incorrect Answers
A:Option A is an acceptance test for API Gateway 4xx versus 5xx root cause: Invoke a malformed request and a forced Lambda error and verify status, request ID, and integration log differences. It is not direct evidence for: An API reads the same public catalog metadata for each user and unnecessarily invokes Lambda every time.
C:Option C is an acceptance test for Lambda timeout and init error diagnosis: Reproduce a missing-layer import fault and a slow handler separately and compare logged phase and error signatures. It is not direct evidence for: An API reads the same public catalog metadata for each user and unnecessarily invokes Lambda every time.
D:Option D 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 reads the same public catalog metadata for each user and unnecessarily invokes Lambda every time.
Question 378
An engineering reviewer is evaluating service behavior and authorization boundaries. A function writes its database password into a debug log after reading an environment variable. Which mechanism explains the appropriate design decision?
- AI-generated suggestions are proposed source changes, not verified runtime behavior or authorization proof.
- Uncontrolled serialization can change timestamp formats and numeric precision, breaking later readers.
- VPC-connected Lambda network interfaces need reachable routes and security-group permissions for database connections.
- Environment variables can hold deployment configuration but hardcoded credentials or plaintext output logs create security risks.
Explanation
Correct Answer
D:Environment variables can hold deployment configuration but hardcoded credentials or plaintext output logs create security risks. This is the operating principle for Lambda environment configuration. Validation: Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration. Scenario: A function writes its database password into a debug log after reading an environment variable.
Incorrect Answers
A:Option A 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 function writes its database password into a debug log after reading an environment variable.
B:Option B explains Application-level JSON serialization rather than this issue: Uncontrolled serialization can change timestamp formats and numeric precision, breaking later readers. It does not explain: A function writes its database password into a debug log after reading an environment variable.
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 function writes its database password into a debug log after reading an environment variable.
Question 379
An AWS developer is reviewing the next application release. A checkout service serves an old sale price because its cached entry was not invalidated after a promotion. Which technical change most directly meets the requirement?
- Use an ElastiCache-backed read-through pattern with bounded TTL and deliberate invalidation for frequently read stable responses.
- Use the service SDK paginator or continuation token until all result pages have been retrieved.
- Use DynamoDB TransactWriteItems to apply a small set of related item changes atomically when the transaction limits permit.
- Package shared supported libraries in versioned Lambda layers compatible with the function runtime and architecture.
Explanation
Correct Answer
A:Caching reduces repeated backend reads but creates a freshness boundary determined by expiration and explicit invalidation. Apply: Use an ElastiCache-backed read-through pattern with bounded TTL and deliberate invalidation for frequently read stable responses. Acceptance check: Update a catalog price and verify clients see the new value after the correct invalidation or TTL rule. Scenario: A checkout service serves an old sale price because its cached entry was not invalidated after a promotion.
Incorrect Answers
B:Option B implements a different developer control (AWS SDK paginator use): Use the service SDK paginator or continuation token until all result pages have been retrieved. That does not resolve the specific situation: A checkout service serves an old sale price because its cached entry was not invalidated after a promotion.
C:Option C implements a different developer control (DynamoDB transaction writes): Use DynamoDB TransactWriteItems to apply a small set of related item changes atomically when the transaction limits permit. That does not resolve the specific situation: A checkout service serves an old sale price because its cached entry was not invalidated after a promotion.
D:Option D implements a different developer control (Lambda layers and runtime dependency packaging): Package shared supported libraries in versioned Lambda layers compatible with the function runtime and architecture. That does not resolve the specific situation: A checkout service serves an old sale price because its cached entry was not invalidated after a promotion.
Question 380
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. Several functions share a helper package but deployments drift because each bundles a different unpinned version. What test most directly confirms the intended behavior?
- Write a test item then issue a strong GetItem and confirm the returned version matches the latest commit.
- Load test a representative key distribution and inspect throttling by partition-key pattern.
- Publish a test layer version, invoke with the exact runtime and CPU architecture, and verify dependencies import.
- Compare duration, memory usage, and invocation cost for two sizes using the same representative workload.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Publish a test layer version, invoke with the exact runtime and CPU architecture, and verify dependencies import. It demonstrates: Runtime compatibility and dependency versions affect import paths and initialization; a layer must match the running function. Scenario: Several functions share a helper package but deployments drift because each bundles a different unpinned version.
Incorrect Answers
A:Option A is an acceptance test for DynamoDB strong read consistency: Write a test item then issue a strong GetItem and confirm the returned version matches the latest commit. It is not direct evidence for: Several functions share a helper package but deployments drift because each bundles a different unpinned version.
B:Option B is an acceptance test for DynamoDB partition key hot spots: Load test a representative key distribution and inspect throttling by partition-key pattern. It is not direct evidence for: Several functions share a helper package but deployments drift because each bundles a different unpinned version.
D:Option D is an acceptance test for Lambda power tuning: Compare duration, memory usage, and invocation cost for two sizes using the same representative workload. It is not direct evidence for: Several functions share a helper package but deployments drift because each bundles a different unpinned version.