View Full Amazon AWS Certified Developer – Associate DVA-C02 Exam Dumps and Practice Test Dumps.
Question 101
A developer needs to ensure that an S3 bucket can only be accessed through a specific CloudFront distribution. Which feature can be used to control access to the S3 origin?
- S3 lifecycle rules
- CloudFront origin access control
- S3 Transfer Acceleration
- S3 Inventory
Correct Answer: 2
Explanation
CloudFront origin access control can be used to restrict direct access to an S3 bucket and allow CloudFront to retrieve objects on behalf of users. The S3 bucket policy can be configured to permit access from the specific CloudFront distribution while preventing direct public access. This architecture allows CloudFront to provide caching and global content delivery while keeping the S3 bucket private. S3 lifecycle rules manage object transitions and expiration, Transfer Acceleration improves transfer performance, and Inventory provides object reports. Origin access control is therefore appropriate when S3 content should be delivered through a specific CloudFront distribution.
Question 102
A developer wants to execute an AWS SDK operation from an application without manually specifying credentials. Which credential provider approach should be preferred when running the application on AWS compute services with an IAM role?
- Hardcoded credentials
- Root account credentials
- IAM role credentials
- Public credentials
Correct Answer: 3
Explanation
AWS SDKs can automatically obtain temporary credentials associated with an IAM role when an application runs on supported AWS compute services. This removes the need to hardcode access keys in application source code or configuration files. The SDK credential provider chain can locate the appropriate credentials automatically. IAM roles should be granted only the permissions required by the workload. Hardcoded credentials and root credentials create unnecessary security risks, while public credentials are not a valid secure authentication mechanism. Using IAM roles with the AWS SDK therefore provides a secure and maintainable approach for applications running on AWS infrastructure.
Question 103
A developer needs an SQS queue to process messages at very high throughput where strict ordering is not required. Which queue type should be selected?
- Standard queue
- FIFO queue
- Dead-letter queue
- Delay queue
Correct Answer: 1
Explanation
Amazon SQS standard queues are designed to provide very high throughput and scalable message processing. They use at-least-once delivery, so applications should be designed to handle possible duplicate messages. Standard queues are appropriate when strict message ordering and FIFO-specific deduplication are not required. FIFO queues provide ordering and deduplication capabilities but are intended for workloads with those requirements. A dead-letter queue is used to isolate messages that repeatedly fail processing, while a delay queue postpones message visibility. For high-throughput asynchronous workloads without strict ordering requirements, a standard queue is appropriate.
Question 104
A developer wants to automatically remove old objects from an S3 bucket after a defined number of days. Which feature should be configured?
- S3 Versioning
- S3 Object Lock
- S3 Lifecycle configuration
- S3 Select
Correct Answer: 3
Explanation
S3 Lifecycle configuration allows developers to define rules that automatically transition or expire objects based on their age or other criteria. For example, objects can be automatically deleted after a specified number of days or moved to lower-cost storage classes. Lifecycle rules can reduce storage costs and automate data-retention requirements. Versioning maintains multiple object versions, Object Lock helps prevent deletion or modification during retention periods, and S3 Select retrieves selected data from supported objects. When the requirement is to automatically remove objects after a defined period, an S3 Lifecycle configuration is the appropriate feature.
Question 105
A developer wants to perform an operation on several DynamoDB items atomically. Which capability should be used?
- DynamoDB transactions
- DynamoDB Scan
- DynamoDB TTL
- DynamoDB Streams
Correct Answer: 1
Explanation
DynamoDB transactions allow multiple item operations to be executed with transactional guarantees. This is useful when several related changes must succeed together or fail together to preserve application consistency. Transactions can include operations across multiple items and tables within the supported limits. Scan retrieves items, TTL automatically expires data, and Streams captures item-level changes. A transaction is therefore appropriate when an application needs atomic behavior across multiple DynamoDB operations. Developers should still consider transaction limits and costs when designing high-volume workloads and use transactions only where the consistency requirement justifies them.
Question 106
A developer needs to send an email notification when a CloudWatch alarm enters an alarm state. Which service can be used as the notification destination?
- Amazon SNS
- Amazon ECR
- Amazon DynamoDB
- Amazon ElastiCache
Correct Answer: 1
Explanation
Amazon SNS can be used as a notification destination for CloudWatch alarms. A CloudWatch alarm can publish a notification to an SNS topic when the monitored metric enters a configured state. Subscribers to the SNS topic can then receive the notification through supported delivery mechanisms, including email. This provides a flexible way to notify operations teams about application errors, high latency, resource utilization, or other monitored conditions. ECR stores container images, DynamoDB provides NoSQL storage, and ElastiCache provides in-memory caching. SNS is therefore appropriate for distributing CloudWatch alarm notifications.
Question 107
A developer wants to reduce the number of requests made to a backend API by caching frequently requested responses. Which API Gateway feature should be considered?
- API Gateway caching
- API Gateway authorizer
- API Gateway resource policy only
- API Gateway deployment stage name
Correct Answer: 1
Explanation
API Gateway caching allows responses from backend integrations to be cached for a configured period. When a subsequent request can be served from the cache, API Gateway can return the cached response instead of invoking the backend again. This can reduce backend load and potentially improve response latency for frequently requested data. Developers should configure cache behavior and invalidation according to application requirements because cached responses can become stale. Authorizers control access, resource policies help control API access, and deployment stages organize API configurations. API Gateway caching is therefore the relevant feature for reducing repeated backend requests.
Question 108
A developer wants a Lambda function to use a third-party library without including the library in every deployment package. Which solution is appropriate?
- Lambda layer
- SQS queue
- API Gateway stage
- CloudWatch alarm
Correct Answer: 1
Explanation
Lambda layers allow developers to package reusable libraries and dependencies separately from Lambda function code. A function can reference one or more layers, allowing common dependencies to be shared among multiple functions. This can reduce duplication and make dependency updates easier to manage. Layers are versioned, so developers can control which dependency version each function uses. SQS provides message queuing, API Gateway stages manage API deployments, and CloudWatch alarms monitor metrics. When several Lambda functions need the same third-party library, a Lambda layer can provide a reusable packaging mechanism.
Question 109
A developer needs an application to receive only new events from a DynamoDB table and trigger processing whenever records change. Which service integration should be used?
- DynamoDB Streams with Lambda
- S3 Lifecycle with Lambda
- CloudFront with DynamoDB
- Route 53 with Lambda
Correct Answer: 1
Explanation
DynamoDB Streams captures item-level changes such as inserts, updates, and deletes. AWS Lambda can consume DynamoDB Streams records through an event source mapping and execute processing logic when changes occur. This creates an event-driven architecture without requiring the application to continuously scan the DynamoDB table for modifications. Developers can use the stream view type appropriate to their processing requirements. S3 Lifecycle rules manage object storage, CloudFront provides content delivery, and Route 53 provides DNS services. DynamoDB Streams combined with Lambda is therefore appropriate for reacting to changes in DynamoDB items.
Question 110
A developer wants to provide a web application with temporary access to a private S3 download. Which solution should be implemented?
- Make the S3 bucket public.
- Generate an S3 presigned URL.
- Disable Block Public Access.
- Create a public IAM user.
Correct Answer: 2
Explanation
An S3 presigned URL provides temporary access to a private object without making the object or bucket publicly accessible. The URL is generated using credentials that have permission to access the object and includes an expiration time. The web application can provide the URL to an authorized user, who can then download the object until the URL expires. Making the bucket public or disabling Block Public Access would provide broader access than required. A public IAM user is also not an appropriate solution. Presigned URLs provide controlled, time-limited access while preserving the private status of the underlying S3 resource.
Question 111
A developer is troubleshooting an application and needs to determine which AWS identity made a specific API call. Which service provides this audit information?
- Amazon CloudFront
- AWS CloudTrail
- Amazon ECR
- Amazon ElastiCache
Correct Answer: 2
Explanation
AWS CloudTrail records API activity in an AWS account and includes information about the identity associated with many API calls. Developers and administrators can use CloudTrail events to investigate changes, identify actions performed on resources, and support auditing requirements. CloudTrail records can include details such as the event name, time, source IP information, and identity information. CloudFront provides content delivery, ECR stores container images, and ElastiCache provides caching. CloudTrail is therefore the appropriate service when an application team needs an audit trail showing which identities performed AWS API operations.
Question 112
A developer wants to process a stream of real-time events from devices and applications. Which AWS service is designed for collecting and processing streaming data?
- Amazon Kinesis Data Streams
- Amazon S3 Glacier
- Amazon Route 53
- Amazon ECR
Correct Answer: 1
Explanation
Amazon Kinesis Data Streams is designed to collect and process real-time streaming data. Applications and devices can send records into data streams, where consumers such as Lambda functions or custom applications can process them. Kinesis Data Streams is useful for workloads such as application telemetry, clickstreams, IoT events, and real-time analytics. S3 Glacier provides archival storage, Route 53 provides DNS services, and ECR stores container images. Kinesis Data Streams is therefore appropriate when an application needs to ingest and process continuously generated records with low latency.
Question 113
A developer wants to create an application that automatically retries a failed Step Functions task several times before moving to an error state. Which feature should be configured?
- Retry configuration in the state machine
- S3 lifecycle rule
- DynamoDB TTL
- CloudFront cache policy
Correct Answer: 1
Explanation
AWS Step Functions supports retry configuration for task states. Developers can specify which errors should be retried, the number of retry attempts, the interval between attempts, and a backoff rate. This allows workflows to recover from transient failures without requiring developers to implement retry loops manually inside application code. If retries are exhausted, the state machine can transition to a configured error-handling path. S3 lifecycle rules, DynamoDB TTL, and CloudFront cache policies serve unrelated purposes. Step Functions retry configuration is therefore appropriate for controlling retry behavior within orchestrated workflows.
Question 114
A developer wants to store an application’s API key securely and retrieve it at runtime. Which service is specifically designed for secure secret storage and retrieval?
- Amazon CloudFront
- AWS Secrets Manager
- Amazon Route 53
- Amazon ECR
Correct Answer: 2
Explanation
AWS Secrets Manager is designed to securely store and retrieve sensitive information such as API keys, passwords, and database credentials. Applications can use the AWS SDK to retrieve secrets at runtime while IAM permissions control which identities can access them. Secrets Manager also supports automatic rotation for supported secret types and custom rotation workflows. Storing API keys directly in source code can expose them through repositories and deployment artifacts. CloudFront provides content delivery, Route 53 provides DNS, and ECR manages container images. Secrets Manager is therefore an appropriate service for securely managing application secrets.
Question 115
A developer needs to deploy a containerized application without managing the underlying servers. Which AWS service can provide a serverless container compute environment?
- Amazon ECR
- Amazon ECS on AWS Fargate
- Amazon S3
- Amazon DynamoDB
Correct Answer: 2
Explanation
Amazon ECS with AWS Fargate provides a way to run containerized workloads without requiring developers to manage the underlying EC2 instances. Developers define task and service configurations, and Fargate provides the compute infrastructure required to run the containers. Container images can be stored in Amazon ECR and pulled by ECS tasks. S3 provides object storage and DynamoDB provides NoSQL database capabilities. Fargate is therefore useful for developers who want to deploy containers while avoiding direct management of the underlying server infrastructure.
Question 116
A developer wants an application to retrieve only items matching a specific partition key from DynamoDB. Which operation should be used?
- Query
- Scan
- DeleteItem
- PutItem
Correct Answer: 1
Explanation
The DynamoDB Query operation retrieves items based on a specified partition key and can also apply conditions to a sort key when one exists. Query is generally more efficient than Scan for targeted access patterns because DynamoDB can use the table or index key structure to locate the relevant items. Scan examines items across a table or index and is generally used when the required key is not known. DeleteItem removes an item, while PutItem creates or replaces an item. Query is therefore the appropriate operation for retrieving items associated with a known partition key.
Question 117
A developer wants to make a Lambda function available through a stable endpoint while deploying new versions behind the endpoint. Which feature can provide this capability?
- Lambda aliases
- S3 Inventory
- DynamoDB TTL
- CloudWatch Logs
Correct Answer: 1
Explanation
Lambda aliases provide stable identifiers that point to published Lambda function versions. An application can invoke an alias rather than referencing a specific version number. During deployment, the alias can be updated to point to the new version, allowing the application endpoint or integration configuration to remain unchanged. Aliases can also support controlled traffic shifting between versions. S3 Inventory reports object information, DynamoDB TTL expires records, and CloudWatch Logs stores application logs. Lambda aliases are therefore useful for stable references during controlled version deployments.
Question 118
A developer wants to protect an API from sudden traffic spikes that could overload the backend service. Which API Gateway feature should be configured?
- API Gateway throttling
- API Gateway models
- API Gateway documentation
- API Gateway stage variables only
Correct Answer: 1
Explanation
API Gateway throttling limits the number of requests that can be processed within configured rate and burst limits. This can protect backend integrations from sudden increases in traffic and help maintain predictable application behavior. Throttling can be applied at different levels depending on the API configuration and usage requirements. Models describe request or response data structures, documentation describes API information, and stage variables provide configuration values. Throttling is therefore the relevant feature when an API needs protection from excessive request rates or traffic bursts.
Question 119
A developer needs to execute code whenever a new message arrives in an SQS queue without maintaining a continuously running server. Which architecture should be used?
- SQS event source mapping with Lambda
- S3 website hosting with Lambda
- Route 53 health checks with Lambda
- CloudFront caching with Lambda
Correct Answer: 1
Explanation
Lambda can process messages from an SQS queue through an event source mapping. Lambda automatically polls the queue and invokes the function with batches of messages when messages are available. This removes the need for a continuously running server dedicated to polling the queue. The Lambda function processes the messages and acknowledges successful processing through the event source integration. Developers should account for retries and design message processing to be idempotent when appropriate. S3 website hosting, Route 53 health checks, and CloudFront caching do not provide the required SQS message-processing architecture.
Question 120
A developer wants to create an application deployment where a new version receives a small percentage of traffic first, while the existing version continues serving the majority of users. Which approach should be used?
- Canary deployment
- Full replacement deployment
- Database migration only
- Manual source-code editing
Correct Answer: 1
Explanation
A canary deployment introduces a new application version to a small portion of traffic while the existing version continues serving most users. Developers can monitor application metrics, logs, errors, and other indicators before gradually increasing traffic to the new version. This provides an opportunity to detect deployment issues before the new release handles all production traffic. AWS deployment services and Lambda aliases can support controlled traffic shifting depending on the architecture. A full replacement deployment changes the active version more directly, while database migration and manual source-code editing do not represent traffic-management deployment strategies.