Amazon AWS Certified Developer – Associate DVA-C02 Practice Test Questions and Exam Dumps Part14 Q261-280

View Full Amazon AWS Certified Developer – Associate DVA-C02 Exam Dumps and Practice Test Dumps.

 

Question 261

A developer needs to ensure that an S3 bucket automatically keeps older versions of an object when a new object with the same key is uploaded. Which feature should be enabled?

  1. S3 Select
  2. S3 Versioning
  3. S3 Transfer Acceleration
  4. S3 Inventory

Correct Answer: 2

Explanation

S3 Versioning allows Amazon S3 to maintain multiple versions of an object under the same key. When an object is replaced or deleted, previous versions can remain available, depending on the bucket configuration and lifecycle policies. This provides protection against accidental overwrites and deletions and can support recovery of earlier object versions. S3 Select is used to retrieve selected data from supported objects, Transfer Acceleration improves transfer performance, and S3 Inventory provides object reports. Versioning is therefore the appropriate feature when an application needs to preserve previous object versions.

Question 262

A developer wants a Lambda function to execute only when messages arrive in an SQS queue. Which architecture is appropriate?

  1. Lambda continuously polls the queue using application code
  2. Configure SQS as a Lambda event source
  3. Store the messages in S3 first
  4. Publish every message to CloudFront

Correct Answer: 2

Explanation

Amazon SQS can be configured as an event source for a Lambda function. Lambda manages the polling of the queue and invokes the function when messages are available, allowing developers to focus on message-processing logic rather than maintaining polling infrastructure. The event source mapping can also control batch size and other processing behavior. Continuously polling through custom application code adds unnecessary operational complexity. S3 and CloudFront are not required for this integration. Configuring SQS as a Lambda event source therefore provides a managed and scalable architecture for processing queued messages.

Question 263

A developer needs to retrieve only selected attributes from DynamoDB items to reduce the amount of data returned by a read operation. Which expression should be used?

  1. ConditionExpression
  2. FilterExpression
  3. ProjectionExpression
  4. KeyConditionExpression

Correct Answer: 3

Explanation

A DynamoDB ProjectionExpression specifies which attributes should be returned from an item or query result. This can help applications retrieve only the data they need rather than returning every attribute. A KeyConditionExpression is used to specify key conditions for Query operations, while FilterExpression filters results after the initial read operation. ConditionExpression is used to control whether write or other operations are allowed based on specified conditions. ProjectionExpression is therefore the appropriate choice when developers need to select particular attributes from DynamoDB results.

Question 264

A developer wants to configure a Lambda function so that a temporary spike in traffic does not allow it to consume all available account concurrency. Which setting should be configured?

  1. Lambda layer
  2. Reserved concurrency
  3. Function URL
  4. Lambda alias

Correct Answer: 2

Explanation

Reserved concurrency establishes a concurrency limit for a specific Lambda function. This prevents the function from consuming more than the configured number of concurrent executions and can protect other functions or downstream systems from excessive resource consumption. Reserved concurrency can also reserve capacity for a function. Lambda layers manage reusable dependencies, function URLs expose HTTPS endpoints, and aliases provide stable references to published versions. Reserved concurrency is therefore appropriate when developers need to control the maximum number of simultaneous executions for a Lambda function during traffic spikes.

Question 265

A developer wants to automatically transition older S3 objects to a lower-cost storage class after a specified period. Which feature should be configured?

  1. S3 Lifecycle rule
  2. S3 Select
  3. S3 Object Lock
  4. S3 Access Point

Correct Answer: 1

Explanation

S3 Lifecycle rules allow developers to automatically transition objects between supported storage classes based on conditions such as object age. This can help optimize storage costs for data that becomes less frequently accessed over time. Lifecycle rules can also be used to expire objects when they are no longer required. S3 Select retrieves selected data from supported objects, Object Lock provides retention protection, and Access Points provide application-specific access control to S3 data. Lifecycle configuration is therefore the appropriate feature for automatically moving older objects to lower-cost storage classes.

Question 266

A developer wants to create a temporary environment containing an application stack that can be reproduced consistently from a template. Which AWS service is most appropriate?

  1. Amazon SNS
  2. AWS CloudFormation
  3. Amazon CloudWatch
  4. Amazon SQS

Correct Answer: 2

Explanation

AWS CloudFormation allows developers to define infrastructure as code using templates. A template can describe resources such as Lambda functions, IAM roles, S3 buckets, DynamoDB tables, and other AWS components. The same template can be used repeatedly to create consistent environments, making it useful for development, testing, staging, and production deployments. SNS provides messaging, CloudWatch provides monitoring, and SQS provides queue-based messaging. CloudFormation is therefore appropriate when an application environment needs to be created consistently and reproducibly from a defined infrastructure template.

Question 267

A developer wants to invoke a Lambda function when an HTTP request is received and does not need advanced API management features. Which option can provide a simple HTTPS endpoint?

  1. Lambda function URL
  2. DynamoDB Stream
  3. S3 Lifecycle
  4. Kinesis shard

Correct Answer: 1

Explanation

Lambda function URLs provide a direct HTTPS endpoint for invoking a Lambda function. They can be useful for simple webhooks, lightweight APIs, and applications that do not require the broader API management capabilities of API Gateway. Developers can configure authentication and access controls according to the use case. DynamoDB Streams capture database changes, S3 Lifecycle manages object storage actions, and Kinesis shards are components of a streaming data architecture. A Lambda function URL is therefore suitable when a straightforward HTTPS endpoint is required for a Lambda function.

Question 268

A developer wants to detect unauthorized or unexpected resource access from AWS resources and applications. Which service can analyze resource policies and access?

  1. AWS IAM Access Analyzer
  2. Amazon CloudFront
  3. Amazon ECR
  4. Amazon S3 Glacier

Correct Answer: 1

Explanation

IAM Access Analyzer provides capabilities for analyzing access to AWS resources and identifying resources that may be accessible outside an intended trust boundary. It can help developers review resource policies and identify external access that may not be necessary. This supports security reviews and least-privilege practices. CloudFront provides content delivery, ECR stores container images, and S3 Glacier provides archival storage. IAM Access Analyzer is therefore useful when developers need visibility into resource access and want to identify potentially unintended external access.

Question 269

A developer needs a message queue that supports exactly ordered processing within message groups and deduplication capabilities. Which SQS option should be selected?

  1. Standard queue
  2. FIFO queue
  3. Delay queue
  4. Dead-letter queue

Correct Answer: 2

Explanation

Amazon SQS FIFO queues are designed for applications that require ordered message processing and deduplication capabilities. Messages can be assigned to message groups, and messages within the same group maintain their order. FIFO queues are useful for workloads where processing order is important, such as financial transactions or sequential application operations. Standard queues provide high throughput but do not provide the same ordering guarantees. Delay queues postpone message availability, while dead-letter queues isolate messages that repeatedly fail processing. FIFO is therefore the appropriate queue type for ordered and deduplicated message processing.

Question 270

A developer wants to configure an API Gateway API so that clients cannot send unlimited requests within a short period. Which feature should be configured?

  1. API Gateway throttling
  2. S3 Versioning
  3. DynamoDB TTL
  4. Lambda Layers

Correct Answer: 1

Explanation

API Gateway throttling controls the rate at which clients can make requests to an API. It helps protect backend services from excessive traffic and can prevent sudden request spikes from overwhelming application resources. Throttling can be configured according to API requirements and can work alongside other controls such as authorization and quotas. S3 Versioning maintains object versions, DynamoDB TTL removes expired items, and Lambda Layers provide reusable dependencies. API Gateway throttling is therefore the appropriate feature for limiting request rates and protecting an API backend.

Question 271

A developer wants to execute a database update only when an item has not been modified since it was last read. Which DynamoDB capability should be used?

  1. Conditional expression
  2. S3 Versioning
  3. CloudFront cache
  4. SNS subscription

Correct Answer: 1

Explanation

DynamoDB conditional expressions can be used to implement optimistic concurrency control. An application can read an item containing a version number and then include a condition requiring that the version still matches when the update is submitted. If another client has changed the item in the meantime, the condition fails and the application can handle the conflict rather than overwriting the newer data. S3 Versioning, CloudFront caching, and SNS subscriptions address different use cases. Conditional expressions are therefore appropriate for ensuring that a DynamoDB update occurs only when the expected item state is still valid.

Question 272

A developer wants to send application events to several independent consumers, including an SQS queue and a Lambda function. Which service is designed for this fanout pattern?

  1. Amazon SNS
  2. Amazon RDS
  3. Amazon EBS
  4. Amazon ElastiCache

Correct Answer: 1

Explanation

Amazon SNS supports a publish/subscribe model that can distribute one published message to multiple subscribers. For example, an SNS topic can deliver messages to an SQS queue and Lambda function independently. This creates a fanout architecture where the publisher does not need to directly manage each consumer. RDS provides relational databases, EBS provides block storage, and ElastiCache provides in-memory caching. SNS is therefore well suited for distributing application events to multiple independent consumers while keeping producers and consumers loosely coupled.

Question 273

A developer wants to store application session data in a low-latency in-memory data store. Which service should be considered?

  1. Amazon ElastiCache
  2. Amazon S3
  3. Amazon ECR
  4. Amazon CloudTrail

Correct Answer: 1

Explanation

Amazon ElastiCache provides managed in-memory data stores that can support low-latency access to frequently used application data. It can be used for caching, session data, and other workloads where fast data retrieval is important. Keeping session information in a shared cache can also help applications running across multiple compute instances or containers access common session state. S3 is object storage, ECR stores container images, and CloudTrail records AWS API activity. ElastiCache is therefore an appropriate service when an application needs a fast, shared in-memory data store.

Question 274

A developer wants to receive an event when a new AWS resource state change occurs and route the event to a Lambda function based on its contents. Which service should be used?

  1. Amazon EventBridge
  2. Amazon ECR
  3. Amazon RDS
  4. Amazon EBS

Correct Answer: 1

Explanation

Amazon EventBridge can receive events from AWS services and evaluate them against event patterns. Rules can route matching events to targets such as Lambda functions, SQS queues, SNS topics, and Step Functions. This enables applications to react automatically to resource state changes without continuously polling AWS APIs. ECR manages container images, RDS provides relational databases, and EBS provides block storage. EventBridge is therefore appropriate when a developer needs to filter AWS events based on their contents and invoke application logic when matching events occur.

Question 275

A developer wants to store a database password securely and retrieve it from an application at runtime. The password also needs automatic rotation. Which service is most appropriate?

  1. AWS Secrets Manager
  2. Amazon S3
  3. Amazon CloudWatch Logs
  4. Amazon ECR

Correct Answer: 1

Explanation

AWS Secrets Manager provides centralized storage for sensitive information such as database passwords and supports secret rotation for supported services and custom rotation workflows. Applications can retrieve secrets at runtime using the AWS SDK or supported integrations instead of storing passwords directly in source code. S3 is object storage, CloudWatch Logs is used for application and service logging, and ECR stores container images. Secrets Manager is therefore appropriate when developers need secure secret storage combined with controlled runtime access and credential rotation capabilities.

Question 276

A developer wants to process records from Kinesis Data Streams using Lambda while controlling how many records are included in each invocation. Which setting is relevant?

  1. Batch size
  2. S3 lifecycle period
  3. API Gateway cache TTL
  4. IAM password policy

Correct Answer: 1

Explanation

When Lambda consumes records from Kinesis Data Streams through an event source mapping, the batch size controls how many records can be included in a Lambda invocation. Adjusting the batch size can affect processing efficiency, invocation frequency, and application latency. Developers should select a value that fits the workload and processing characteristics. S3 lifecycle settings control object transitions or expiration, API Gateway cache settings control cached responses, and IAM password policies manage user authentication requirements. Batch size is therefore the relevant configuration when controlling the number of Kinesis records processed in each Lambda invocation.

Question 277

A developer wants to monitor distributed application requests and identify which downstream service is responsible for increased latency. Which service should be used?

  1. AWS X-Ray
  2. Amazon S3
  3. Amazon ECR
  4. Amazon SQS

Correct Answer: 1

Explanation

AWS X-Ray provides distributed tracing capabilities that help developers understand how requests travel through application components and AWS services. Trace information can show service calls, response times, errors, and dependencies, making it useful for identifying performance bottlenecks in distributed architectures. This is particularly valuable for applications that use Lambda, API Gateway, and multiple backend services. S3 provides object storage, ECR manages container images, and SQS provides message queues. X-Ray is therefore appropriate when developers need to trace requests and investigate latency across multiple application components.

Question 278

A developer wants a CI/CD workflow to automatically build application source code after a source change. Which AWS service is designed to perform managed build jobs?

  1. AWS CodeBuild
  2. Amazon CloudFront
  3. Amazon DynamoDB
  4. Amazon Route 53

Correct Answer: 1

Explanation

AWS CodeBuild is a managed build service that compiles source code, runs tests, and produces build artifacts. It can integrate with source repositories and CI/CD workflows and can execute commands defined in a build specification. CodeBuild removes the need to maintain dedicated build servers and can scale build environments according to workload requirements. CloudFront provides content delivery, DynamoDB provides NoSQL storage, and Route 53 provides DNS services. CodeBuild is therefore appropriate when an automated development workflow requires a managed environment for compiling, testing, and packaging application code.

Question 279

A developer wants to deploy a new application version while gradually shifting traffic from the old version to the new version. Which deployment strategy supports this approach?

  1. Canary deployment
  2. Full replacement without testing
  3. Manual file copying only
  4. Permanent rollback

Correct Answer: 1

Explanation

A canary deployment gradually directs a portion of traffic to a new application version while the existing version continues serving the remaining traffic. Developers can monitor the new version for errors, latency, and other operational indicators before increasing its traffic percentage. This provides an opportunity to detect problems before the new version handles the complete workload. A full replacement immediately shifts traffic, while manual copying does not provide a structured deployment strategy. Canary deployment is therefore appropriate when developers want gradual traffic movement and observation during a release.

Question 280

A developer wants to invoke an AWS Lambda function from an application using an AWS SDK and ensure the request is authenticated using AWS credentials. Which mechanism provides authentication?

  1. IAM-based request signing
  2. Public S3 access
  3. Anonymous HTTP requests
  4. CloudFront cache invalidation

Correct Answer: 1

Explanation

AWS APIs can authenticate requests using AWS credentials and signature mechanisms supported by the AWS SDK. The SDK handles request signing so developers generally do not need to implement the cryptographic signing process manually. IAM policies then determine whether the authenticated principal is authorized to perform the requested action. Public S3 access and anonymous requests do not provide appropriate authentication for protected AWS API operations, while CloudFront cache invalidation is unrelated. IAM-based authentication and request signing therefore provide the appropriate mechanism when an application calls AWS APIs securely through an SDK.