Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 33
Question 320
A diagnostic middleware records full request headers including Authorization during a failed API call. A teammate asks why the proposed Lambda environment secret leakage approach is technically appropriate. Which AWS behavior BEST explains the decision?
- SigV4 signs request components using AWS credentials and short-lived credentials include a session token.
- Encryption at rest does not stop an application from leaking plaintext secrets during logging.
- IAM database authentication issues short-lived login tokens but database user permissions still control SQL access.
- Secret scanning reduces accidental credential publication but exposed keys must be invalidated.
Explanation
Correct Answer
B:Encryption at rest does not stop an application from leaking plaintext secrets during logging. This is the governing behavior behind the recommended change: redact secret-bearing environment values and authorization headers from structured application logs.
Incorrect Answers
A:The statement describes SigV4 authenticated SDK requests, which is not the controlling AWS behavior for this Lambda environment secret leakage situation. The required implementation is: redact secret-bearing environment values and authorization headers from structured application logs.
C:The statement describes IAM authentication and TLS for RDS, which is not the controlling AWS behavior for this Lambda environment secret leakage situation. The required implementation is: redact secret-bearing environment values and authorization headers from structured application logs.
D:The statement describes secret scanning in CI, which is not the controlling AWS behavior for this Lambda environment secret leakage situation. The required implementation is: redact secret-bearing environment values and authorization headers from structured application logs.
Question 321
A job encrypts multi-megabyte objects and needs controlled decryption by approved services. A teammate asks why the proposed KMS envelope encryption approach is technically appropriate. Which AWS behavior BEST explains the decision?
- Cognito identity pools broker temporary AWS credentials for supported identity providers.
- Envelope encryption uses a data key for payload encryption and protects that key using a KMS key.
- AWS credential provider chains support ephemeral sessions and remove the need for embedded static secrets.
- Cross-account KMS use needs key-policy authorization in the owning account and corresponding caller permissions.
Explanation
Correct Answer
B:Envelope encryption uses a data key for payload encryption and protects that key using a KMS key. This is the governing behavior behind the recommended change: generate a data key using AWS KMS, encrypt the payload locally, and store the encrypted data key alongside the ciphertext.
Incorrect Answers
A:The statement describes Cognito identity pool AWS access, which is not the controlling AWS behavior for this KMS envelope encryption situation. The required implementation is: generate a data key using AWS KMS, encrypt the payload locally, and store the encrypted data key alongside the ciphertext.
C:The statement describes temporary credential storage, which is not the controlling AWS behavior for this KMS envelope encryption situation. The required implementation is: generate a data key using AWS KMS, encrypt the payload locally, and store the encrypted data key alongside the ciphertext.
D:The statement describes KMS key-policy cross-account, which is not the controlling AWS behavior for this KMS envelope encryption situation. The required implementation is: generate a data key using AWS KMS, encrypt the payload locally, and store the encrypted data key alongside the ciphertext.
Question 322
A support dashboard receives a valid token for tenant A and must not let it request tenant B's records. A teammate asks why the proposed application tenant authorization approach is technically appropriate. Which AWS behavior BEST explains the decision?
- Cross-account KMS use needs key-policy authorization in the owning account and corresponding caller permissions.
- Secrets Manager versions and rotation workflows manage sensitive values outside deployment artifacts.
- JWT verification checks cryptographic signature and claims, not only whether a header exists.
- Authentication proves a principal, whereas tenant-level authorization constrains which records it may access.
Explanation
Correct Answer
D:Authentication proves a principal, whereas tenant-level authorization constrains which records it may access. This is the governing behavior behind the recommended change: enforce tenant ownership checks in application code against validated identity claims for every data access.
Incorrect Answers
A:The statement describes KMS key-policy cross-account, which is not the controlling AWS behavior for this application tenant authorization situation. The required implementation is: enforce tenant ownership checks in application code against validated identity claims for every data access.
B:The statement describes Secrets Manager rotation, which is not the controlling AWS behavior for this application tenant authorization situation. The required implementation is: enforce tenant ownership checks in application code against validated identity claims for every data access.
C:The statement describes API Gateway JWT authorizer, which is not the controlling AWS behavior for this application tenant authorization situation. The required implementation is: enforce tenant ownership checks in application code against validated identity claims for every data access.
Question 323
A refund process must pause for approval and track which previous steps succeeded before compensating. A teammate asks why the proposed Step Functions orchestration approach is technically appropriate. Which AWS behavior BEST explains the decision?
- Circuit breakers limit cascading latency while allowing controlled recovery after dependency outages.
- Lambda layers package reusable dependencies separately while runtime compatibility must still match.
- A managed state machine expresses multi-step application coordination beyond a single long-running handler.
- Strongly consistent reads are available on DynamoDB tables and LSIs in a Region, not GSIs.
Explanation
Correct Answer
C:A managed state machine expresses multi-step application coordination beyond a single long-running handler. This is the governing behavior behind the recommended change: use AWS Step Functions to coordinate states, retries, catches, and compensating tasks explicitly.
Incorrect Answers
A:The statement describes third-party circuit breaker, which is not the controlling AWS behavior for this Step Functions orchestration situation. The required implementation is: use AWS Step Functions to coordinate states, retries, catches, and compensating tasks explicitly.
B:The statement describes Lambda layer dependency management, which is not the controlling AWS behavior for this Step Functions orchestration situation. The required implementation is: use AWS Step Functions to coordinate states, retries, catches, and compensating tasks explicitly.
D:The statement describes DynamoDB strong read consistency, which is not the controlling AWS behavior for this Step Functions orchestration situation. The required implementation is: use AWS Step Functions to coordinate states, retries, catches, and compensating tasks explicitly.
Question 324
An internal REST API needs to deny requests outside approved network-origin conditions. A teammate asks why the proposed API Gateway resource policy approach is technically appropriate. Which AWS behavior BEST explains the decision?
- AWS service-to-service calls use IAM identity and resource permissions according to API requirements.
- IAM database authentication issues short-lived login tokens but database user permissions still control SQL access.
- Resource policies can restrict the source principals or network context independently from route authorizers.
- Encryption at rest does not stop an application from leaking plaintext secrets during logging.
Explanation
Correct Answer
C:Resource policies can restrict the source principals or network context independently from route authorizers. This is the governing behavior behind the recommended change: define an API Gateway resource policy with explicit conditions for approved source VPC endpoints.
Incorrect Answers
A:The statement describes service-to-service IAM authorization, which is not the controlling AWS behavior for this API Gateway resource policy situation. The required implementation is: define an API Gateway resource policy with explicit conditions for approved source VPC endpoints.
B:The statement describes IAM authentication and TLS for RDS, which is not the controlling AWS behavior for this API Gateway resource policy situation. The required implementation is: define an API Gateway resource policy with explicit conditions for approved source VPC endpoints.
D:The statement describes Lambda environment secret leakage, which is not the controlling AWS behavior for this API Gateway resource policy situation. The required implementation is: define an API Gateway resource policy with explicit conditions for approved source VPC endpoints.
Question 325
An event handler reads from one queue while a reporting handler writes to a different DynamoDB table. A teammate asks why the proposed Lambda execution-role separation approach is technically appropriate. Which AWS behavior BEST explains the decision?
- IAM database authentication issues short-lived login tokens but database user permissions still control SQL access.
- Secrets Manager versions and rotation workflows manage sensitive values outside deployment artifacts.
- JWT verification checks cryptographic signature and claims, not only whether a header exists.
- Separate execution roles reduce blast radius when individual workloads are compromised.
Explanation
Correct Answer
D:Separate execution roles reduce blast radius when individual workloads are compromised. This is the governing behavior behind the recommended change: assign distinct least-privilege execution roles to functions according to their required service calls.
Incorrect Answers
A:The statement describes IAM authentication and TLS for RDS, which is not the controlling AWS behavior for this Lambda execution-role separation situation. The required implementation is: assign distinct least-privilege execution roles to functions according to their required service calls.
B:The statement describes Secrets Manager rotation, which is not the controlling AWS behavior for this Lambda execution-role separation situation. The required implementation is: assign distinct least-privilege execution roles to functions according to their required service calls.
C:The statement describes API Gateway JWT authorizer, which is not the controlling AWS behavior for this Lambda execution-role separation situation. The required implementation is: assign distinct least-privilege execution roles to functions according to their required service calls.
Question 326
A repository pipeline must catch malformed SAM definitions before creating cloud resources. A teammate asks why the proposed SAM template validation approach is technically appropriate. Which AWS behavior BEST explains the decision?
- Canary deployment limits initial exposure by progressively shifting live traffic to a candidate version.
- Template validation catches syntactic and supported structural IaC problems but not all runtime behavior.
- API Gateway stage configuration can parameterize integrations for separate environments.
- IaC tracks declared infrastructure; out-of-band console edits can cause state divergence.
Explanation
Correct Answer
B:Template validation catches syntactic and supported structural IaC problems but not all runtime behavior. This is the governing behavior behind the recommended change: run sam validate and template linting before packaging and deploying the application.
Incorrect Answers
A:The statement describes CodeDeploy Lambda canary, which is not the controlling AWS behavior for this SAM template validation situation. The required implementation is: run sam validate and template linting before packaging and deploying the application.
C:The statement describes API Gateway stage variables, which is not the controlling AWS behavior for this SAM template validation situation. The required implementation is: run sam validate and template linting before packaging and deploying the application.
D:The statement describes infrastructure drift detection, which is not the controlling AWS behavior for this SAM template validation situation. The required implementation is: run sam validate and template linting before packaging and deploying the application.
Question 327
A service retrieves all activity records for one user partition within a date range. A teammate asks why the proposed DynamoDB Query versus Scan approach is technically appropriate. Which AWS behavior BEST explains the decision?
- Kinesis ordering is guaranteed within a shard and partition key choices determine shard affinity.
- SQS partial batch response avoids unnecessary redelivery of successful records in a partially failed batch.
- Strongly consistent reads are available on DynamoDB tables and LSIs in a Region, not GSIs.
- Query uses key conditions while Scan examines items beyond the requested partition.
Explanation
Correct Answer
D:Query uses key conditions while Scan examines items beyond the requested partition. This is the governing behavior behind the recommended change: use DynamoDB Query with the customer partition key and an appropriate sort-key condition.
Incorrect Answers
A:The statement describes Kinesis shard partitioning, which is not the controlling AWS behavior for this DynamoDB Query versus Scan situation. The required implementation is: use DynamoDB Query with the customer partition key and an appropriate sort-key condition.
B:The statement describes Lambda event source partial batch response, which is not the controlling AWS behavior for this DynamoDB Query versus Scan situation. The required implementation is: use DynamoDB Query with the customer partition key and an appropriate sort-key condition.
C:The statement describes DynamoDB strong read consistency, which is not the controlling AWS behavior for this DynamoDB Query versus Scan situation. The required implementation is: use DynamoDB Query with the customer partition key and an appropriate sort-key condition.
Question 328
A function unpacks a compressed model into ephemeral storage before processing requests. A teammate asks why the proposed Lambda ephemeral disk sizing approach is technically appropriate. Which AWS behavior BEST explains the decision?
- Configuration releases can be separated from binary releases with validators and deployment controls.
- API Gateway stages provide deployment boundaries and can hold environment-specific settings.
- Immutable deployments create replacement capacity to limit in-place update impact.
- Lambda ephemeral storage is separately configurable from memory and has finite per-environment capacity.
Explanation
Correct Answer
D:Lambda ephemeral storage is separately configurable from memory and has finite per-environment capacity. This is the governing behavior behind the recommended change: configure Lambda ephemeral storage capacity appropriately and clean temporary files between invocations.
Incorrect Answers
A:The statement describes environment-specific AppConfig, which is not the controlling AWS behavior for this Lambda ephemeral disk sizing situation. The required implementation is: configure Lambda ephemeral storage capacity appropriately and clean temporary files between invocations.
B:The statement describes API Gateway staging endpoints, which is not the controlling AWS behavior for this Lambda ephemeral disk sizing situation. The required implementation is: configure Lambda ephemeral storage capacity appropriately and clean temporary files between invocations.
C:The statement describes Elastic Beanstalk immutable update, which is not the controlling AWS behavior for this Lambda ephemeral disk sizing situation. The required implementation is: configure Lambda ephemeral storage capacity appropriately and clean temporary files between invocations.
Question 329
A data-sharing workload has S3 read access but cannot decrypt an encrypted cross-account report. A teammate asks why the proposed KMS key-policy cross-account approach is technically appropriate. Which AWS behavior BEST explains the decision?
- Cross-account KMS use needs key-policy authorization in the owning account and corresponding caller permissions.
- Secret scanning reduces accidental credential publication but exposed keys must be invalidated.
- Cross-account roles require both role trust and permission policy authorization.
- SSE-KMS authorization involves both S3 API access and KMS cryptographic authorization.
Explanation
Correct Answer
A:Cross-account KMS use needs key-policy authorization in the owning account and corresponding caller permissions. This is the governing behavior behind the recommended change: authorize the external principal through the KMS key policy and the caller's IAM permissions for the needed cryptographic operation.
Incorrect Answers
B:The statement describes secret scanning in CI, which is not the controlling AWS behavior for this KMS key-policy cross-account situation. The required implementation is: authorize the external principal through the KMS key policy and the caller's IAM permissions for the needed cryptographic operation.
C:The statement describes IAM STS AssumeRole cross-account, which is not the controlling AWS behavior for this KMS key-policy cross-account situation. The required implementation is: authorize the external principal through the KMS key policy and the caller's IAM permissions for the needed cryptographic operation.
D:The statement describes S3 SSE-KMS access, which is not the controlling AWS behavior for this KMS key-policy cross-account situation. The required implementation is: authorize the external principal through the KMS key policy and the caller's IAM permissions for the needed cryptographic operation.
Question 330
An external tax service has a prolonged outage and checkout must degrade predictably. A teammate asks why the proposed third-party circuit breaker approach is technically appropriate. Which AWS behavior BEST explains the decision?
- Runtime configuration separates deployment settings from executable code when values differ by environment.
- Multipart uploads allow independent parts and require a final completion call.
- Visibility hides an in-flight SQS message temporarily; it does not acknowledge completion.
- Circuit breakers limit cascading latency while allowing controlled recovery after dependency outages.
Explanation
Correct Answer
D:Circuit breakers limit cascading latency while allowing controlled recovery after dependency outages. This is the governing behavior behind the recommended change: use a circuit breaker with bounded timeouts and a documented fallback for the external dependency.
Incorrect Answers
A:The statement describes Lambda environment configuration, which is not the controlling AWS behavior for this third-party circuit breaker situation. The required implementation is: use a circuit breaker with bounded timeouts and a documented fallback for the external dependency.
B:The statement describes S3 multipart upload recovery, which is not the controlling AWS behavior for this third-party circuit breaker situation. The required implementation is: use a circuit breaker with bounded timeouts and a documented fallback for the external dependency.
C:The statement describes SQS visibility timeout, which is not the controlling AWS behavior for this third-party circuit breaker situation. The required implementation is: use a circuit breaker with bounded timeouts and a documented fallback for the external dependency.