View Full Amazon AWS Certified Developer – Associate DVA-C02 Exam Dumps and Practice Test Dumps.
Question 141
A developer wants to prevent duplicate processing when the same request is submitted multiple times to an application. Which concept should be implemented?
- Caching
- Idempotency
- Compression
- Pagination
Correct Answer: 2
Explanation
Idempotency allows an application to safely process repeated requests without producing unintended duplicate side effects. This is especially important for operations such as creating orders, processing payments, or submitting transactions where retrying the same request could otherwise create duplicate records. An application can use an idempotency key to identify repeated requests and return the result of the original operation rather than performing the operation again. Caching stores frequently accessed data, compression reduces data size, and pagination divides large result sets. Idempotency is therefore an important design principle for reliable distributed applications.
Question 142
A developer needs to query DynamoDB using an attribute that is not part of the table’s primary key. Which feature should be used?
- DynamoDB TTL
- DynamoDB Streams
- Global secondary index
- DynamoDB transaction
Correct Answer: 3
Explanation
A global secondary index allows DynamoDB applications to create an alternative key structure for querying data. The partition key of the global secondary index can be different from the partition key of the base table. This enables applications to support additional access patterns without scanning the entire table. The index can also include projected attributes needed by the application. TTL is used for automatic expiration, Streams captures item changes, and transactions provide atomic operations. A global secondary index is therefore appropriate when an application needs efficient queries based on attributes that are not part of the table’s original primary key.
Question 143
A developer wants to ensure that sensitive data stored in DynamoDB is encrypted using customer-managed AWS KMS keys. Which capability should be configured?
- DynamoDB encryption with AWS KMS
- DynamoDB Streams
- DynamoDB TTL
- DynamoDB Scan
Correct Answer: 1
Explanation
Amazon DynamoDB supports encryption at rest and can integrate with AWS Key Management Service for encryption key management. When customer-managed KMS keys are required, the appropriate DynamoDB encryption configuration can use a customer-managed key. IAM permissions and key policies must allow the required DynamoDB operations. Streams captures changes to items, TTL manages expiration, and Scan retrieves items across a table or index. Encryption at rest protects stored DynamoDB data without requiring the application to implement its own encryption for every database operation. This is useful when organizations require additional control over encryption keys.
Question 144
A developer wants to reduce Lambda cold-start impact for a latency-sensitive application. Which feature can help keep execution environments initialized and ready?
- Lambda Provisioned Concurrency
- Lambda layers
- Lambda environment variables
- Lambda tags
Correct Answer: 1
Explanation
Lambda Provisioned Concurrency initializes a specified number of execution environments and keeps them ready to respond to invocations. This can reduce cold-start latency for applications where predictable response times are important. It is particularly useful for interactive APIs and other latency-sensitive workloads. Lambda layers package shared dependencies, environment variables provide configuration values, and tags help organize AWS resources. Provisioned Concurrency does not eliminate every possible source of latency, but it specifically addresses initialization delays by keeping execution environments prepared for invocation.
Question 145
A developer wants to process records from Kinesis Data Streams using Lambda. Which configuration is required?
- Event source mapping
- S3 lifecycle rule
- CloudFront cache policy
- Route 53 hosted zone
Correct Answer: 1
Explanation
Lambda event source mappings allow a Lambda function to consume records from supported streaming services, including Kinesis Data Streams. Lambda polls the stream and invokes the function with batches of records. The event source mapping manages the relationship between the stream and the Lambda function, while developers configure parameters such as batch size and starting position according to the workload. S3 lifecycle rules manage object retention, CloudFront cache policies control caching behavior, and Route 53 hosted zones manage DNS records. Event source mapping is therefore the appropriate integration for processing Kinesis records with Lambda.
Question 146
A developer wants an application to retrieve secret values without exposing them in source code or configuration files. Which approach is appropriate?
- Store the secret in an S3 public object.
- Store the secret in AWS Secrets Manager and retrieve it at runtime.
- Store the secret in a Git repository.
- Store the secret in a container image.
Correct Answer: 2
Explanation
AWS Secrets Manager provides secure storage for sensitive values such as passwords, API keys, and database credentials. An application can retrieve a secret at runtime through the AWS SDK after IAM authorization is verified. This prevents sensitive values from being embedded directly in application source code, repositories, or deployment artifacts. Secrets Manager can also support automatic rotation for supported use cases. Public S3 objects, Git repositories, and container images are inappropriate locations for confidential credentials because they can increase the risk of accidental exposure. Runtime retrieval from a dedicated secrets-management service provides a more secure application architecture.
Question 147
A developer needs an API to return a cached response for repeated requests for the same resource. Which service feature should be considered?
- API Gateway caching
- IAM policy
- Lambda layer
- SQS visibility timeout
Correct Answer: 1
Explanation
API Gateway caching can store responses for API requests and return cached results for subsequent requests that meet the cache configuration. This can reduce the number of requests sent to backend services and improve response latency for frequently requested resources. Developers should configure cache behavior according to the API’s requirements because cached information may become stale. IAM policies control permissions, Lambda layers package reusable dependencies, and SQS visibility timeout controls message visibility after receipt. API Gateway caching is therefore the feature designed specifically to reduce repeated backend requests by serving cached responses.
Question 148
A developer wants to automatically scale an ECS service based on CPU utilization. Which AWS capability should be used?
- Amazon S3 Lifecycle
- Application Auto Scaling
- AWS KMS
- Amazon Route 53
Correct Answer: 2
Explanation
Application Auto Scaling can automatically adjust the desired number of ECS service tasks based on configured metrics and scaling policies. For example, an ECS service can scale out when CPU utilization increases and scale in when demand decreases. This helps applications respond to changing workloads without requiring developers to manually modify the number of running tasks. S3 Lifecycle manages object storage transitions and expiration, KMS manages encryption keys, and Route 53 provides DNS services. Application Auto Scaling is therefore appropriate for automatically adjusting ECS service capacity according to application demand.
Question 149
A developer wants to detect application errors and search Lambda execution logs efficiently. Which CloudWatch capability should be used?
- CloudWatch Logs
- CloudWatch billing only
- CloudWatch dashboards only
- CloudWatch tags
Correct Answer: 1
Explanation
CloudWatch Logs stores log messages generated by AWS Lambda and other AWS services and applications. Developers can use log groups and log streams to organize execution records and investigate application errors. Logs can be searched and analyzed to identify failures, unexpected values, and execution behavior. CloudWatch dashboards can visualize metrics but are not the primary storage mechanism for Lambda log messages. Billing information and resource tags serve different purposes. CloudWatch Logs is therefore the appropriate capability when developers need detailed execution information for troubleshooting and error investigation.
Question 150
A developer wants to use a database connection across multiple Lambda invocations when the execution environment is reused. Where should the connection initialization generally occur?
- Inside the handler for every invocation
- Outside the handler during initialization
- In an S3 bucket
- In an API Gateway stage
Correct Answer: 2
Explanation
Reusable resources such as database connections or AWS SDK clients can often be initialized outside the Lambda handler. When Lambda reuses an execution environment for subsequent invocations, resources initialized outside the handler may remain available and can be reused. This can reduce connection setup overhead and improve application performance. Developers must still account for connection timeouts, database limits, and the possibility that an execution environment will be recreated. Initializing a connection inside the handler for every invocation can create unnecessary overhead. S3 buckets and API Gateway stages are not mechanisms for maintaining Lambda execution resources.
Question 151
A developer needs to send a notification to several subscribers whenever a new event occurs. Which AWS service is designed for this publish/subscribe pattern?
- Amazon SNS
- Amazon ECR
- Amazon RDS
- Amazon CloudFront
Correct Answer: 1
Explanation
Amazon Simple Notification Service (SNS) provides a publish/subscribe messaging model. A publisher sends a message to an SNS topic, and multiple subscribers can receive the notification through their respective subscriptions. SNS supports several subscription types and can also fan out messages to SQS queues for independent asynchronous processing. ECR stores container images, RDS provides relational database services, and CloudFront distributes content globally. SNS is therefore well suited to scenarios where one application event needs to notify multiple independent consumers without requiring the publisher to communicate with each consumer separately.
Question 152
A developer wants to store a frequently accessed value in memory to improve application response time. Which service is suitable?
- Amazon ElastiCache
- Amazon CloudTrail
- Amazon ECR
- Amazon Route 53
Correct Answer: 1
Explanation
Amazon ElastiCache provides managed in-memory data stores that can be used to cache frequently accessed information. By retrieving data from memory instead of repeatedly querying a persistent database, applications can reduce backend load and improve response latency. ElastiCache can be used with compatible engines and application architectures according to workload requirements. CloudTrail records AWS API activity, ECR stores container images, and Route 53 provides DNS services. ElastiCache is therefore an appropriate option when an application needs a dedicated, high-speed caching layer for frequently requested data.
Question 153
A developer wants to make a Lambda function available as an HTTP endpoint without managing an API server. Which feature can be used for a simple HTTP interface?
- Lambda function URL
- DynamoDB Stream
- S3 Lifecycle rule
- Kinesis shard
Correct Answer: 1
Explanation
Lambda function URLs provide a dedicated HTTP(S) endpoint for invoking a Lambda function. They can be useful when an application needs a simple HTTP interface and does not require the full API management capabilities of API Gateway. Developers can configure authentication and other function URL settings according to application requirements. DynamoDB Streams captures database changes, S3 lifecycle rules manage object transitions and expiration, and Kinesis shards organize streaming data. A Lambda function URL is therefore a suitable option for exposing a function directly through an HTTP endpoint when the API requirements are relatively simple.
Question 154
A developer needs to transfer a large file to Amazon S3 efficiently by uploading multiple parts independently. Which feature should be used?
- S3 multipart upload
- S3 Object Lock
- S3 Inventory
- S3 Select
Correct Answer: 1
Explanation
S3 multipart upload divides a large object into smaller parts that can be uploaded independently. Parts can be uploaded in parallel, which can improve throughput and make large uploads more resilient to individual transfer failures. After all required parts are uploaded successfully, S3 assembles them into the final object. Multipart upload is especially useful for large files and applications with unreliable network connections. Object Lock provides retention protection, Inventory provides object reports, and S3 Select retrieves selected data from supported objects. Multipart upload is therefore the appropriate feature for efficient large-object uploads.
Question 155
A developer wants to prevent a Lambda function from being invoked more times concurrently than a downstream database can handle. Which configuration should be used?
- Reserved concurrency
- Lambda layer
- Function URL
- CloudWatch log group
Correct Answer: 1
Explanation
Reserved concurrency can limit the maximum number of concurrent executions for a Lambda function. This can protect downstream systems such as databases or external APIs from receiving more simultaneous requests than they can handle. When the concurrency limit is reached, additional invocations can be throttled according to Lambda behavior. Layers package dependencies, function URLs provide HTTP access, and CloudWatch log groups store logs. Setting an appropriate reserved concurrency value can therefore help control application load and prevent a downstream resource from being overwhelmed by excessive parallel Lambda executions.
Question 156
A developer wants to store application data in a NoSQL database that can provide single-digit millisecond performance at scale. Which AWS service is appropriate?
- Amazon RDS
- Amazon DynamoDB
- Amazon Redshift
- Amazon Neptune
Correct Answer: 2
Explanation
Amazon DynamoDB is a fully managed NoSQL database designed to provide low-latency performance at scale. It supports key-value and document data models and can automatically scale according to workload requirements. DynamoDB is commonly used for applications that require predictable low-latency access and flexible data structures. RDS provides managed relational databases, Redshift is designed primarily for analytics and data warehousing, and Neptune is a graph database service. DynamoDB is therefore appropriate when an application needs a scalable NoSQL database with low-latency access patterns.
Question 157
A developer wants to inspect AWS API activity to determine when a resource configuration was changed. Which service should be used?
- AWS CloudTrail
- Amazon CloudFront
- Amazon ElastiCache
- Amazon ECR
Correct Answer: 1
Explanation
AWS CloudTrail records AWS API activity and can help developers and administrators investigate resource changes. CloudTrail events can provide information about the API operation, time of the event, identity that made the request, and other request details. This makes CloudTrail useful for auditing, security investigations, and troubleshooting unexpected configuration changes. CloudFront handles content delivery, ElastiCache provides caching, and ECR manages container images. CloudTrail is therefore the appropriate service when an application team needs an audit trail of AWS API calls and resource configuration changes.
Question 158
A developer needs to run code in response to events without provisioning or managing servers. Which AWS service is most appropriate?
- Amazon EC2
- AWS Lambda
- Amazon RDS
- Amazon ECR
Correct Answer: 2
Explanation
AWS Lambda is a serverless compute service that runs code in response to events without requiring developers to manage the underlying servers. Lambda functions can be triggered by services such as S3, API Gateway, EventBridge, SQS, and DynamoDB Streams. AWS manages the compute infrastructure and automatically handles execution environments according to the workload. EC2 requires management of virtual servers, RDS provides managed relational databases, and ECR stores container images. Lambda is therefore appropriate for event-driven workloads where developers want to focus on application code rather than server administration.
Question 159
A developer wants to move an object automatically from S3 Standard to a lower-cost storage class after a certain period. Which feature should be configured?
- S3 Lifecycle rule
- S3 Versioning
- S3 Object Lock
- S3 Select
Correct Answer: 1
Explanation
S3 Lifecycle rules can automatically transition objects between supported S3 storage classes according to configured conditions such as object age. This allows applications to optimize storage costs as data becomes less frequently accessed. A lifecycle rule can also be combined with expiration actions when data should eventually be removed. Versioning maintains multiple object versions, Object Lock provides retention protection, and S3 Select retrieves selected data from objects. Lifecycle configuration is therefore the appropriate mechanism for automatically moving objects to different storage classes based on their age or other defined criteria.
Question 160
A developer wants to configure an application so that an AWS service failure does not immediately cause the entire workflow to fail. Which design principle is most appropriate?
- Fault tolerance
- Hardcoding
- Tight coupling
- Single-point dependency
Correct Answer: 1
Explanation
Fault tolerance involves designing an application so that it can continue operating when individual components or dependencies experience failures. AWS applications can use techniques such as retries with exponential backoff, queues, multiple availability zones, dead-letter queues, graceful degradation, and redundant components to improve resilience. Hardcoding and tight coupling can make applications harder to adapt and recover, while single-point dependencies increase the impact of individual failures. Fault-tolerant architecture does not mean that failures never occur; instead, it reduces the effect of failures and allows applications to recover or continue providing functionality when individual components become unavailable.