Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 6
Question 50
A search box must find phrases and relevance-ranked matches across an indexed document corpus. Which implementation approach BEST addresses this requirement?
- Run a full table Scan on each keystroke and call it full-text ranking.
- Put every document into a single DynamoDB partition and use Query for relevance.
- Index searchable fields in Amazon OpenSearch Service and query the text index with an appropriate analyzer.
- Use S3 object version IDs as a linguistic analyzer.
Explanation
Correct Answer
C:Index searchable fields in Amazon OpenSearch Service and query the text index with an appropriate analyzer. Full-text search uses analyzed inverted indexes rather than DynamoDB exact-key access. A confirming test would show: Search results return ranked text matches according to indexed tokens and query clauses.
Incorrect Answers
A:Run a full table Scan on each keystroke and call it full-text ranking. This suggestion does not establish the required OpenSearch full-text queries; the relevant risk is that a DynamoDB key-only Query cannot perform arbitrary relevance-ranked text search.
B:Put every document into a single DynamoDB partition and use Query for relevance. This suggestion does not establish the required OpenSearch full-text queries; the relevant risk is that a DynamoDB key-only Query cannot perform arbitrary relevance-ranked text search.
D:Use S3 object version IDs as a linguistic analyzer. This suggestion does not establish the required OpenSearch full-text queries; the relevant risk is that a DynamoDB key-only Query cannot perform arbitrary relevance-ranked text search.
Question 51
A custom API domain has an expiring public TLS certificate and its clients must keep authenticating endpoints. Which implementation approach BEST addresses this requirement?
- Disable HTTPS verification permanently on every client.
- Replace TLS with Base64 encoding of response bodies.
- Put the certificate's private key in client JavaScript.
- Provision and validate the certificate using AWS Certificate Manager and associate the renewed certificate with the endpoint.
Explanation
Correct Answer
D:Provision and validate the certificate using AWS Certificate Manager and associate the renewed certificate with the endpoint. TLS certificates authenticate endpoint names and protect traffic in transit. A confirming test would show: TLS handshakes present a valid chain and expected hostname before and after rotation.
Incorrect Answers
A:Disable HTTPS verification permanently on every client. This suggestion does not establish the required TLS certificate rotation ACM; the relevant risk is that an expired or mismatched certificate causes client TLS verification failures.
B:Replace TLS with Base64 encoding of response bodies. This suggestion does not establish the required TLS certificate rotation ACM; the relevant risk is that an expired or mismatched certificate causes client TLS verification failures.
C:Put the certificate's private key in client JavaScript. This suggestion does not establish the required TLS certificate rotation ACM; the relevant risk is that an expired or mismatched certificate causes client TLS verification failures.
Question 52
An API fanout causes thousands of concurrent calls to a downstream rate-limited billing system. Which implementation approach BEST addresses this requirement?
- Limit parallelism and introduce queue-based backpressure with bounded retries and metrics.
- Disable all rate-limit metrics during load testing.
- Increase the number of parallel calls after every 429 response.
- Drop every delayed event without a recovery or retention strategy.
Explanation
Correct Answer
A:Limit parallelism and introduce queue-based backpressure with bounded retries and metrics. Concurrency controls must reflect downstream capacity rather than only upstream invocation volume. A confirming test would show: Downstream 429 rates fall while queue depth and processing age remain within the service objective.
Incorrect Answers
B:Disable all rate-limit metrics during load testing. This suggestion does not establish the required concurrency backpressure; the relevant risk is that unbounded fanout can overwhelm a dependency even if the caller has ample compute capacity.
C:Increase the number of parallel calls after every 429 response. This suggestion does not establish the required concurrency backpressure; the relevant risk is that unbounded fanout can overwhelm a dependency even if the caller has ample compute capacity.
D:Drop every delayed event without a recovery or retention strategy. This suggestion does not establish the required concurrency backpressure; the relevant risk is that unbounded fanout can overwhelm a dependency even if the caller has ample compute capacity.
Question 53
A build service in one account needs read-only access to a deployment artifact bucket in a second account. Which implementation approach BEST addresses this requirement?
- Copy the destination account's root keys into the source account.
- Allow any AWS principal in the role trust policy.
- Assume a scoped IAM role through STS with a trust policy permitting the source principal.
- Add only an S3 bucket tag and expect STS authorization to change.
Explanation
Correct Answer
C:Assume a scoped IAM role through STS with a trust policy permitting the source principal. Cross-account roles require both role trust and permission policy authorization. A confirming test would show: CloudTrail shows the expected assumed role session and only the allowed target-account API actions succeed.
Incorrect Answers
A:Copy the destination account's root keys into the source account. This suggestion does not establish the required IAM STS AssumeRole cross-account; the relevant risk is that a correct permission policy without an allowed trust relationship cannot be assumed.
B:Allow any AWS principal in the role trust policy. This suggestion does not establish the required IAM STS AssumeRole cross-account; the relevant risk is that a correct permission policy without an allowed trust relationship cannot be assumed.
D:Add only an S3 bucket tag and expect STS authorization to change. This suggestion does not establish the required IAM STS AssumeRole cross-account; the relevant risk is that a correct permission policy without an allowed trust relationship cannot be assumed.
Question 54
Debug logs include application identifiers and must be kept for a documented 30-day operational policy. Which implementation approach BEST addresses this requirement?
- Store retention days in an API query string with no log-group configuration.
- Delete the log group daily including current troubleshooting events.
- Set a CloudWatch Logs retention policy matching the operational retention requirement.
- Increase the Lambda timeout to control log retention.
Explanation
Correct Answer
C:Set a CloudWatch Logs retention policy matching the operational retention requirement. CloudWatch log groups retain data indefinitely by default unless a retention setting is configured. A confirming test would show: Old routine log events age out according to policy while newer diagnostic events stay queryable.
Incorrect Answers
A:Store retention days in an API query string with no log-group configuration. This suggestion does not establish the required CloudWatch log retention; the relevant risk is that leaving retention unlimited can accumulate unnecessary log storage and compliance exposure.
B:Delete the log group daily including current troubleshooting events. This suggestion does not establish the required CloudWatch log retention; the relevant risk is that leaving retention unlimited can accumulate unnecessary log storage and compliance exposure.
D:Increase the Lambda timeout to control log retention. This suggestion does not establish the required CloudWatch log retention; the relevant risk is that leaving retention unlimited can accumulate unnecessary log storage and compliance exposure.
Question 55
An application encrypts large exported reports while keeping master keys protected by KMS. Which implementation approach BEST addresses this requirement?
- Hardcode a plaintext symmetric key in source control.
- Generate a data key using AWS KMS, encrypt the payload locally, and store the encrypted data key alongside the ciphertext.
- Use Base64 encoding and call it encryption.
- Log plaintext generated data keys for debugging.
Explanation
Correct Answer
B:Generate a data key using AWS KMS, encrypt the payload locally, and store the encrypted data key alongside the ciphertext. Envelope encryption uses a data key for payload encryption and protects that key using a KMS key. A confirming test would show: An approved role can decrypt the wrapped data key while an unauthorized role cannot.
Incorrect Answers
A:Hardcode a plaintext symmetric key in source control. This suggestion does not establish the required KMS envelope encryption; the relevant risk is that sending large documents directly through a small KMS Encrypt API payload is unsuitable.
C:Use Base64 encoding and call it encryption. This suggestion does not establish the required KMS envelope encryption; the relevant risk is that sending large documents directly through a small KMS Encrypt API payload is unsuitable.
D:Log plaintext generated data keys for debugging. This suggestion does not establish the required KMS envelope encryption; the relevant risk is that sending large documents directly through a small KMS Encrypt API payload is unsuitable.
Question 56
Integration tests create temporary DynamoDB and SQS resources that must not touch live customer records. Which implementation approach BEST addresses this requirement?
- Let test code select resource names from untrusted user input.
- Run destructive integration tests on the production table.
- Deploy a separate IaC-managed test stack with isolated resource names and clean it up after testing.
- Reuse the production queue URL because it is convenient.
Explanation
Correct Answer
C:Deploy a separate IaC-managed test stack with isolated resource names and clean it up after testing. Environment isolation prevents test mutations from affecting production state. A confirming test would show: Integration tests use temporary resource ARNs and cleanup leaves production resources unchanged.
Incorrect Answers
A:Let test code select resource names from untrusted user input. This suggestion does not establish the required stage-isolated integration stack; the relevant risk is that sharing production tables with integration tests can corrupt real data.
B:Run destructive integration tests on the production table. This suggestion does not establish the required stage-isolated integration stack; the relevant risk is that sharing production tables with integration tests can corrupt real data.
D:Reuse the production queue URL because it is convenient. This suggestion does not establish the required stage-isolated integration stack; the relevant risk is that sharing production tables with integration tests can corrupt real data.
Question 57
A SaaS API validates JWTs but must restrict reads to the tenant represented by the caller's verified claims. Which implementation approach BEST addresses this requirement?
- Enforce tenant ownership checks in application code against validated identity claims for every data access.
- Trust a caller-supplied tenantId query parameter without checking claims.
- Put tenant identity only in an unverified browser cookie.
- Disable row filters for all logged-in users.
Explanation
Correct Answer
A:Enforce tenant ownership checks in application code against validated identity claims for every data access. Authentication proves a principal, whereas tenant-level authorization constrains which records it may access. A confirming test would show: Cross-tenant requests receive an authorization failure even with otherwise valid login tokens.
Incorrect Answers
B:Trust a caller-supplied tenantId query parameter without checking claims. This suggestion does not establish the required application tenant authorization; the relevant risk is that treating any valid JWT as permission to read arbitrary tenant IDs leaks cross-tenant data.
C:Put tenant identity only in an unverified browser cookie. This suggestion does not establish the required application tenant authorization; the relevant risk is that treating any valid JWT as permission to read arbitrary tenant IDs leaks cross-tenant data.
D:Disable row filters for all logged-in users. This suggestion does not establish the required application tenant authorization; the relevant risk is that treating any valid JWT as permission to read arbitrary tenant IDs leaks cross-tenant data.
Question 58
A Lambda log shows AccessDenied when reading an object encrypted by a customer-managed KMS key. Which implementation approach BEST addresses this requirement?
- Assume successful TCP connectivity proves encryption authorization.
- Turn off all application logging before testing policies.
- Trace the caller identity, the requested S3 action, and the KMS key permissions with CloudTrail evidence.
- Rename the S3 key without reviewing the KMS failure.
Explanation
Correct Answer
C:Trace the caller identity, the requested S3 action, and the KMS key permissions with CloudTrail evidence. Authorization for an encrypted object can involve multiple services and different policy evaluators. A confirming test would show: The denied API event identifies the principal and missing permission or key-policy condition.
Incorrect Answers
A:Assume successful TCP connectivity proves encryption authorization. This suggestion does not establish the required AccessDenied troubleshooting chain; the relevant risk is that only adjusting s3:GetObject cannot fix an explicit KMS decrypt denial.
B:Turn off all application logging before testing policies. This suggestion does not establish the required AccessDenied troubleshooting chain; the relevant risk is that only adjusting s3:GetObject cannot fix an explicit KMS decrypt denial.
D:Rename the S3 key without reviewing the KMS failure. This suggestion does not establish the required AccessDenied troubleshooting chain; the relevant risk is that only adjusting s3:GetObject cannot fix an explicit KMS decrypt denial.
Question 59
A Lambda function in a VPC must reach a private RDS endpoint without exposing the database publicly. Which implementation approach BEST addresses this requirement?
- Replace the execution role with broad IAM access to repair TCP connectivity.
- Make the RDS instance publicly accessible by default.
- Attach Lambda to appropriate subnets and security groups with allowed routes and database connectivity.
- Put database credentials in a public API Gateway stage variable.
Explanation
Correct Answer
C:Attach Lambda to appropriate subnets and security groups with allowed routes and database connectivity. VPC networking and security groups control reachability independently of IAM API authorization. A confirming test would show: Network tests confirm outbound connectivity from the function to the private endpoint on its service port.
Incorrect Answers
A:Replace the execution role with broad IAM access to repair TCP connectivity. This suggestion does not establish the required Lambda VPC private data access; the relevant risk is that missing security-group or routing rules prevent TCP access to a private endpoint.
B:Make the RDS instance publicly accessible by default. This suggestion does not establish the required Lambda VPC private data access; the relevant risk is that missing security-group or routing rules prevent TCP access to a private endpoint.
D:Put database credentials in a public API Gateway stage variable. This suggestion does not establish the required Lambda VPC private data access; the relevant risk is that missing security-group or routing rules prevent TCP access to a private endpoint.
Question 60
A single infrastructure template must deploy a dev and prod stack with different memory settings. Which implementation approach BEST addresses this requirement?
- Duplicate production secrets in template descriptions.
- Change DNS cache time-to-live instead of template parameters.
- Parameterize the CloudFormation or SAM template and supply environment-specific values at deployment.
- Hand-edit each deployed resource in the console after every commit.
Explanation
Correct Answer
C:Parameterize the CloudFormation or SAM template and supply environment-specific values at deployment. Template parameters and mappings allow controlled environment variation from one IaC definition. A confirming test would show: The change set shows the intended resource values for the selected environment without modifying source templates.
Incorrect Answers
A:Duplicate production secrets in template descriptions. This suggestion does not establish the required CloudFormation resource parameters; the relevant risk is that hardcoding production resource names in a shared template can cause cross-environment collisions.
B:Change DNS cache time-to-live instead of template parameters. This suggestion does not establish the required CloudFormation resource parameters; the relevant risk is that hardcoding production resource names in a shared template can cause cross-environment collisions.
D:Hand-edit each deployed resource in the console after every commit. This suggestion does not establish the required CloudFormation resource parameters; the relevant risk is that hardcoding production resource names in a shared template can cause cross-environment collisions.