Amazon AWS Certified Developer – Associate DVA-C02 Practice Test Questions and Exam Dumps Part17 Q321-340

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

 

Question 321

A developer needs to store application configuration values that are not sensitive and retrieve them at runtime from a centralized location. Which AWS service is appropriate?

  1. Amazon ECR
  2. AWS Systems Manager Parameter Store
  3. Amazon CloudFront
  4. Amazon SQS

Correct Answer: 2

Explanation

AWS Systems Manager Parameter Store provides centralized storage for configuration data such as application settings, environment values, and other parameters. Applications can retrieve these values at runtime through the AWS SDK or AWS CLI. Parameter Store also supports encrypted SecureString parameters when sensitive configuration values need additional protection. Amazon ECR stores container images, CloudFront provides content delivery, and SQS provides message queuing. Using Parameter Store helps keep configuration separate from application code and deployment packages, making applications easier to configure across development, testing, and production environments.

Question 322

A developer needs to execute a Lambda function at a fixed time every day without requiring an application server to remain running. Which AWS service can provide this schedule?

  1. Amazon EventBridge Scheduler
  2. Amazon ECR
  3. Amazon DynamoDB
  4. AWS CodeArtifact

Correct Answer: 1

Explanation

Amazon EventBridge Scheduler can create scheduled invocations for supported AWS targets, including Lambda functions. A developer can define a recurring schedule such as once per day and configure the Lambda function as the target. This eliminates the need to maintain a continuously running server solely for scheduling. DynamoDB provides NoSQL storage, ECR stores container images, and CodeArtifact manages software packages. EventBridge Scheduler is therefore appropriate when an application needs reliable time-based invocation of AWS resources without maintaining dedicated scheduling infrastructure.

Question 323

A developer wants to allow a Lambda function to access a DynamoDB table. Which permission must be granted to the Lambda execution role?

  1. AmazonS3FullAccess
  2. AmazonEC2ReadOnlyAccess
  3. Appropriate DynamoDB permissions
  4. AmazonRoute53FullAccess

Correct Answer: 3

Explanation

A Lambda function uses its execution role to obtain permissions for AWS API operations performed during execution. If the function needs to read or write DynamoDB data, the execution role must include appropriate DynamoDB permissions, ideally restricted to the required table and actions. Granting unrelated permissions such as S3, EC2, or Route 53 access does not provide the required DynamoDB authorization. Following the principle of least privilege, developers should grant only the actions the function actually needs, such as GetItem, PutItem, UpdateItem, or Query.

Question 324

A developer is designing a Lambda function that processes large files and frequently reaches its configured timeout. Which action can directly increase the maximum execution duration available to the function?

  1. Increase the Lambda timeout setting
  2. Increase the S3 bucket version count
  3. Increase the DynamoDB item size
  4. Increase the API Gateway cache size

Correct Answer: 1

Explanation

AWS Lambda allows developers to configure a function timeout that determines the maximum amount of time an invocation can run before Lambda terminates it. Increasing the timeout can help when a legitimate workload requires more processing time. However, developers should also investigate why the function is slow and consider optimization, parallel processing, batching, or asynchronous architectures when appropriate. S3 versioning, DynamoDB item size, and API Gateway caching do not directly change Lambda execution duration. Therefore, increasing the Lambda timeout is the direct configuration change for extending the allowed execution time.

Question 325

A developer wants to ensure that a message-processing application does not permanently lose messages when processing fails repeatedly. Which SQS feature should be configured?

  1. Long polling
  2. Dead-letter queue
  3. Message delay
  4. Queue encryption only

Correct Answer: 2

Explanation

An SQS dead-letter queue can receive messages that cannot be successfully processed after a configured number of receive attempts. The source queue uses a redrive policy to determine when messages should be moved to the dead-letter queue. This prevents repeatedly failing messages from continuously blocking normal processing and provides a location where developers can investigate failed messages. Long polling reduces empty receives, message delay postpones message availability, and encryption protects message contents. A dead-letter queue is therefore appropriate for isolating messages that repeatedly fail processing.

Question 326

A developer wants an SQS consumer to receive multiple messages in a single request to improve processing efficiency. Which setting should be considered?

  1. Batch size
  2. Queue URL
  3. Message retention
  4. Queue name

Correct Answer: 1

Explanation

SQS consumers can retrieve multiple messages in a single receive operation, allowing applications to process messages in batches rather than making a separate request for every message. When Lambda is configured with SQS as an event source, the event source mapping also supports batch-size configuration. Batch processing can reduce API overhead and improve application efficiency, although developers must design the consumer carefully to handle partial failures and retries. Queue URL, queue name, and message retention identify or manage the queue but do not determine how many messages a consumer processes in one batch.

Question 327

A developer needs an API endpoint to return cached responses for repeated requests to reduce backend processing. Which API Gateway feature can provide this behavior?

  1. API Gateway caching
  2. API Gateway authorizer
  3. Lambda layer
  4. SQS visibility timeout

Correct Answer: 1

Explanation

API Gateway caching can store responses from backend integrations and return cached results for subsequent matching requests during the configured cache period. This can reduce backend workload and improve response latency for requests where the underlying data does not need to be retrieved on every request. An authorizer handles authentication or authorization decisions, Lambda layers manage shared dependencies, and SQS visibility timeout controls message visibility after retrieval. API Gateway caching is therefore appropriate when repeated API requests can safely use previously generated responses.

Question 328

A developer wants to prevent unauthorized users from accessing an API Gateway endpoint by requiring authentication through Amazon Cognito. Which API Gateway capability can be configured?

  1. S3 bucket policy
  2. Cognito authorizer
  3. DynamoDB Stream
  4. CloudWatch dashboard

Correct Answer: 2

Explanation

API Gateway can integrate with Amazon Cognito user pools through an authorizer. The authorizer validates authentication information, such as tokens issued by the configured Cognito user pool, before allowing access to protected API methods. This allows applications to use managed user authentication while keeping authorization logic integrated with API Gateway. S3 bucket policies control access to S3 resources, DynamoDB Streams capture database changes, and CloudWatch dashboards display monitoring information. A Cognito authorizer is therefore appropriate when an API should require authenticated users from a Cognito user pool.

Question 329

A developer needs to store a large binary object such as a video file for an application. Which AWS service is designed for durable object storage?

  1. Amazon RDS
  2. Amazon S3
  3. Amazon SQS
  4. Amazon ElastiCache

Correct Answer: 2

Explanation

Amazon S3 is designed for highly durable object storage and can store objects such as videos, images, documents, backups, and application files. Applications can upload and retrieve objects through AWS APIs, SDKs, presigned URLs, or other supported mechanisms. RDS provides relational database storage, SQS provides messaging, and ElastiCache provides in-memory caching. S3 also supports features such as versioning, lifecycle management, encryption, and event notifications. Therefore, S3 is the appropriate service for storing large binary objects that need durable and scalable object storage.

Question 330

A developer wants an application to automatically process a file after it is uploaded to S3 without continuously polling the bucket. Which architecture is appropriate?

  1. S3 event notification invoking a Lambda function
  2. EC2 instance polling every second
  3. DynamoDB TTL
  4. CloudWatch dashboard

Correct Answer: 1

Explanation

S3 event notifications can automatically send object-created events to supported destinations such as Lambda. The Lambda function can then process the uploaded object without an application server continuously polling the bucket. This event-driven architecture can reduce unnecessary requests and infrastructure management. An EC2 instance that repeatedly polls the bucket introduces additional operational overhead and is generally unnecessary for this event-driven requirement. DynamoDB TTL manages item expiration, while CloudWatch dashboards provide monitoring views. S3 event notifications with Lambda are therefore appropriate for automatically processing objects immediately after relevant bucket events occur.

Question 331

A developer needs to execute multiple DynamoDB write operations as one atomic unit so that either all operations succeed or none are applied. Which feature should be used?

  1. DynamoDB Scan
  2. DynamoDB Streams
  3. DynamoDB transactions
  4. DynamoDB TTL

Correct Answer: 3

Explanation

DynamoDB transactions allow developers to perform multiple related operations atomically. With transactional writes, the application can ensure that all required operations succeed together or that none of the changes are committed. This is useful when maintaining consistency across multiple items or tables is important. DynamoDB Scan retrieves items, Streams capture changes, and TTL automatically removes expired items. Transactions provide the required atomic behavior for coordinated database changes. Developers should consider transaction limits, capacity consumption, and application access patterns when deciding whether transactional operations are necessary.

Question 332

A developer needs to identify which AWS API calls changed resources in an account for auditing purposes. Which AWS service should be used?

  1. AWS CloudTrail
  2. Amazon ElastiCache
  3. Amazon CloudFront
  4. AWS CodeArtifact

Correct Answer: 1

Explanation

AWS CloudTrail records AWS API activity and provides information about actions performed against AWS resources. Developers and administrators can use CloudTrail events to identify who performed an operation, which resource was affected, when the action occurred, and other relevant request information. This makes CloudTrail valuable for auditing, security investigations, and operational troubleshooting. ElastiCache provides in-memory caching, CloudFront provides content delivery, and CodeArtifact manages software packages. CloudTrail is therefore the appropriate service for recording and investigating AWS API activity.

Question 333

A developer needs to store frequently accessed application data in memory to achieve very low-latency reads. Which AWS service is suitable?

  1. Amazon S3
  2. Amazon ElastiCache
  3. Amazon Glacier storage class
  4. Amazon SQS

Correct Answer: 2

Explanation

Amazon ElastiCache provides managed in-memory caching using technologies such as Redis and Memcached. Applications can store frequently accessed data in memory and retrieve it with much lower latency than repeatedly querying a persistent database. Caching can reduce database workload and improve application response times. S3 and archival storage classes are designed for object storage rather than low-latency application caching, while SQS is a messaging service. ElastiCache is therefore appropriate when an application requires fast access to frequently used temporary or cached data.

Question 334

A developer needs to allow an application to retrieve only specific objects from an S3 bucket based on an IAM policy. Which IAM concept can restrict access to particular resources?

  1. Resource ARN
  2. Lambda timeout
  3. SQS visibility timeout
  4. CloudWatch retention

Correct Answer: 1

Explanation

IAM policies can specify resource ARNs to restrict permissions to particular AWS resources. For S3, a policy can identify a specific bucket or object path and grant only the required actions against those resources. This supports least-privilege access by limiting permissions to the resources an application actually needs. Lambda timeout controls function execution duration, SQS visibility timeout controls message visibility, and CloudWatch retention controls log retention. Using specific resource ARNs in IAM policies helps developers avoid granting unnecessarily broad permissions to application components.

Question 335

A developer is using an AWS SDK and wants credentials to be obtained automatically from the runtime environment rather than being hard-coded in the application. Which mechanism should be preferred?

  1. AWS SDK credential provider chain
  2. Hard-coded access keys
  3. Credentials stored in source control
  4. Credentials embedded in the container image

Correct Answer: 1

Explanation

The AWS SDK credential provider chain allows applications to obtain credentials from supported sources according to the runtime environment. Depending on where the application runs, credentials may come from an IAM role, environment configuration, shared credential files, or other supported providers. This avoids embedding long-term access keys directly into source code. Hard-coded credentials and credentials committed to source control create security risks and make rotation more difficult. Using the SDK credential provider chain allows applications to use the appropriate temporary or configured credentials while keeping authentication details outside application logic.

Question 336

A developer wants to make a Lambda deployment package smaller by moving shared libraries into a separate reusable component. Which feature should be used?

  1. Lambda destinations
  2. Lambda layers
  3. Lambda aliases
  4. Lambda environment variables

Correct Answer: 2

Explanation

Lambda layers allow developers to package common libraries and dependencies separately from the function’s deployment package. Multiple Lambda functions can reference the same layer, reducing duplication and helping keep individual deployment artifacts smaller. Layers can contain libraries, custom runtimes, or other shared components. Destinations handle asynchronous invocation outcomes, aliases provide named references to versions, and environment variables store configuration values. Lambda layers are therefore appropriate when shared dependencies should be managed separately and reused across multiple functions.

Question 337

A developer needs to ensure that only one consumer processes a particular SQS message at a time while it is being handled. Which mechanism provides this behavior after the message is received?

  1. Visibility timeout
  2. Message retention
  3. Queue policy
  4. Delivery delay

Correct Answer: 1

Explanation

When an SQS consumer receives a message, the message becomes temporarily invisible to other consumers for the duration of the visibility timeout. This helps prevent multiple consumers from processing the same message simultaneously under normal conditions. The consumer should delete the message after successful processing. Message retention determines how long messages remain available in the queue, delivery delay postpones initial availability, and a queue policy controls access permissions. Visibility timeout is therefore the key mechanism for temporarily preventing another consumer from receiving the same message during processing.

Question 338

A developer wants to automatically scale the number of ECS tasks based on application demand. Which AWS capability can be used?

  1. ECS Service Auto Scaling
  2. S3 Lifecycle
  3. Lambda layers
  4. DynamoDB Streams

Correct Answer: 1

Explanation

Amazon ECS Service Auto Scaling can adjust the desired number of running tasks according to configured scaling policies and CloudWatch metrics. For example, a service can scale out when CPU or memory utilization increases and scale in when demand decreases. This allows containerized applications to respond dynamically to workload changes. S3 Lifecycle manages object transitions and expiration, Lambda layers manage shared dependencies, and DynamoDB Streams capture item changes. ECS Service Auto Scaling is therefore the appropriate capability when an ECS service needs to automatically adjust its task count according to workload.

Question 339

A developer needs to route events to different targets based on the contents of each event. Which EventBridge feature should be configured?

  1. Event pattern matching
  2. S3 versioning
  3. SQS visibility timeout
  4. Lambda layers

Correct Answer: 1

Explanation

Amazon EventBridge event patterns allow rules to match specific fields and values within incoming events. A rule can then route matching events to one or more configured targets. This enables event-driven architectures where different event types are processed by different services or workflows. S3 versioning maintains object versions, SQS visibility timeout controls message availability after receipt, and Lambda layers manage reusable dependencies. EventBridge event pattern matching is therefore appropriate when an application needs to route events according to their content rather than sending every event to the same destination.

Question 340

A developer needs to retrieve a specific item from DynamoDB using its primary key and does not need to search through multiple items. Which operation should be used?

  1. Scan
  2. Query
  3. GetItem
  4. BatchWriteItem

Correct Answer: 3

Explanation

The DynamoDB GetItem operation retrieves a single item using its primary key. It is appropriate when the application already knows the exact key of the item it needs. Query is used to retrieve multiple items based on a partition key and optional sort-key conditions, while Scan examines items across a table or index. BatchWriteItem performs multiple put or delete operations but does not retrieve a single item. GetItem is therefore the most direct operation when the application needs one specific DynamoDB item identified by its primary key.