View Full Amazon AWS Certified Developer – Associate DVA-C02 Exam Dumps and Practice Test Dumps.
Question 121
A developer needs to ensure that an SQS message is not processed by another consumer while the current consumer is working on it. Which setting should be configured?
- Message retention period
- Visibility timeout
- Delivery delay
- Long polling
Correct Answer: 2
Explanation
The SQS visibility timeout determines how long a message remains hidden after a consumer receives it. During this period, another consumer cannot normally receive the same message. The timeout should be long enough for the application to complete processing. If processing takes longer than the visibility timeout, the message can become visible again and may be processed by another consumer. Message retention determines how long messages remain in the queue, delivery delay postpones initial availability, and long polling controls how consumers wait for messages. Visibility timeout is therefore the key setting for preventing concurrent processing of the same message during normal processing.
Question 122
A developer wants to securely provide an application running on Amazon ECS with access to AWS services without storing credentials in the container image. Which approach should be used?
- Store access keys in the Dockerfile.
- Use an IAM task role.
- Store the root credentials in the container.
- Make the AWS resources public.
Correct Answer: 2
Explanation
Amazon ECS supports IAM task roles that provide temporary AWS credentials to containers. The application can use these credentials through the AWS SDK without embedding long-term access keys in the container image. The task role should contain only the permissions required by the application, following the principle of least privilege. Storing credentials in a Dockerfile or container image can expose them to anyone who can access the image. Using root credentials is especially risky, while making AWS resources public removes necessary access controls. IAM task roles therefore provide a secure way for ECS applications to access AWS services.
Question 123
A developer needs to store an application’s session data with automatic expiration. Which DynamoDB feature can help remove expired records?
- DynamoDB TTL
- DynamoDB Streams
- Global secondary index
- DynamoDB transactions
Correct Answer: 1
Explanation
DynamoDB Time to Live (TTL) allows applications to mark items for automatic expiration. The application stores an expiration timestamp in a designated attribute, and DynamoDB uses that value to identify items that are eligible for removal. TTL is useful for session data, temporary tokens, cached records, and other information that should not remain indefinitely. DynamoDB Streams captures item changes, global secondary indexes provide alternate query patterns, and transactions provide atomic operations. TTL reduces the need for custom cleanup processes and can help manage temporary application data automatically.
Question 124
A developer wants to allow an application to access a private S3 object for only 10 minutes. Which solution is most appropriate?
- Public-read ACL
- S3 bucket public policy
- Presigned URL with a 10-minute expiration
- Disable S3 Block Public Access
Correct Answer: 3
Explanation
An S3 presigned URL can provide temporary access to a private object for a specified period. The application can generate a URL with an expiration time of 10 minutes and provide it to the authorized user. After the expiration time, the URL can no longer be used to perform the permitted S3 operation. This avoids making the object or bucket publicly accessible. Public ACLs, bucket policies that allow anonymous access, and disabling Block Public Access provide broader access than required and can create security risks. Presigned URLs are therefore appropriate for controlled, time-limited access to private S3 resources.
Question 125
A developer is building a serverless application and needs to store small configuration values that are not secrets. Which service is suitable?
- AWS Systems Manager Parameter Store
- Amazon CloudFront
- Amazon ECR
- Amazon Route 53
Correct Answer: 1
Explanation
AWS Systems Manager Parameter Store provides centralized storage for application configuration values. Developers can store values such as environment-specific settings, service endpoints, feature flags, and other configuration information without hardcoding them into source code. Parameter Store supports ordinary String parameters and encrypted SecureString parameters. CloudFront is a content delivery service, ECR stores container images, and Route 53 provides DNS functionality. Separating configuration from application code makes deployments easier to manage because different environments can use different parameter values without requiring source-code changes.
Question 126
A developer wants to ensure that an API client cannot send more than a specified number of requests per second. Which feature should be used?
- API Gateway throttling
- Lambda layers
- S3 Versioning
- DynamoDB TTL
Correct Answer: 1
Explanation
API Gateway throttling allows developers to control the rate at which requests are accepted by an API. Rate and burst limits can help protect backend integrations from excessive traffic and provide predictable service behavior. Throttling can be configured according to the requirements of the API and its consumers. Lambda layers manage shared dependencies, S3 Versioning maintains object versions, and DynamoDB TTL removes expired items. When the primary requirement is to limit API request rates and protect backend resources from excessive requests, API Gateway throttling is the appropriate feature.
Question 127
A developer needs to process an S3 object immediately after it is uploaded. Which event-driven integration should be used?
- S3 event notification invoking Lambda
- S3 Inventory report
- S3 lifecycle expiration
- S3 Transfer Acceleration
Correct Answer: 1
Explanation
S3 event notifications allow Amazon S3 to send events when actions such as object creation occur. A Lambda function can be configured as a destination for the relevant event, allowing processing to begin after an object is uploaded. This pattern is useful for image processing, file validation, document conversion, and metadata extraction. S3 Inventory generates periodic reports rather than immediate processing events. Lifecycle rules manage object transitions or expiration, while Transfer Acceleration improves transfer performance. S3 event notifications with Lambda therefore provide an event-driven solution for processing newly uploaded objects.
Question 128
A developer wants to protect an S3 bucket from accidental public access. Which configuration should be enabled?
- S3 Block Public Access
- S3 Transfer Acceleration
- S3 Select
- S3 Inventory
Correct Answer: 1
Explanation
Amazon S3 Block Public Access provides settings that help prevent public access to buckets and objects. These controls can block public bucket policies, public ACLs, or other configurations that could unintentionally expose data. Block Public Access is an important defense against accidental public exposure and can be applied at the account, bucket, or access point level depending on the configuration. Transfer Acceleration is intended for faster transfers, Select retrieves portions of object data, and Inventory provides object reports. When the goal is to reduce the risk of accidental public S3 access, Block Public Access is an appropriate security control.
Question 129
A developer wants to create a DynamoDB index that uses different key attributes from the base table and can have its own projection. Which index type should be used?
- Local secondary index
- Global secondary index
- DynamoDB Stream
- DynamoDB TTL
Correct Answer: 2
Explanation
A DynamoDB global secondary index can use a different partition key and optional sort key from the base table’s primary key. It can also define which non-key attributes are projected into the index. This provides additional query patterns that are not supported by the table’s original primary key. Local secondary indexes share the same partition key as the base table but use a different sort key. Streams capture item changes, and TTL manages item expiration. A global secondary index is therefore appropriate when an application needs to query DynamoDB using an alternate partition-key design.
Question 130
A developer needs to run a containerized workload periodically according to a schedule without maintaining a server. Which service can schedule the workload?
- Amazon EventBridge Scheduler
- Amazon ECR
- Amazon S3
- Amazon KMS
Correct Answer: 1
Explanation
Amazon EventBridge Scheduler can invoke supported AWS targets according to defined schedules. It supports rate-based and cron-based schedules, making it useful for periodic application tasks. Depending on the architecture, a schedule can initiate workflows, invoke Lambda functions, or trigger other supported targets that ultimately start container workloads. ECR is used to store container images, S3 provides object storage, and KMS manages encryption keys. EventBridge Scheduler separates scheduling from the application’s execution logic and eliminates the need to maintain a dedicated server solely for running scheduled jobs.
Question 131
A developer needs to capture the previous and new values of DynamoDB items whenever they change. Which feature should be configured?
- DynamoDB TTL
- DynamoDB Streams
- DynamoDB auto scaling
- DynamoDB global tables
Correct Answer: 2
Explanation
DynamoDB Streams can capture information about changes made to items in a DynamoDB table. The stream view type determines what information is recorded. Options can include keys only, new item images, old item images, or both old and new images. Capturing both images is useful when an application needs to compare the state of an item before and after a modification. TTL handles expiration, auto scaling adjusts provisioned capacity, and global tables provide multi-Region replication. DynamoDB Streams is therefore the appropriate feature for capturing item-level changes and their previous and current values.
Question 132
A developer wants an application to automatically recover from transient Lambda failures when invoking the function asynchronously. Which behavior should the developer consider?
- Lambda asynchronous retry behavior
- S3 Object Lock
- DynamoDB TTL
- CloudFront invalidation
Correct Answer: 1
Explanation
Lambda asynchronous invocations have built-in retry behavior for certain function errors. When an asynchronous invocation fails, Lambda can retry the event according to its asynchronous invocation behavior. Developers should understand retry timing and configure destinations or other failure-handling mechanisms when necessary. For workloads where duplicate processing is possible, functions should be designed to be idempotent. S3 Object Lock protects objects from deletion or overwrite, DynamoDB TTL handles item expiration, and CloudFront invalidation removes cached content. Lambda asynchronous retry behavior is therefore relevant when transient invocation failures need automatic retry handling.
Question 133
A developer needs to allow a Lambda function to access a secret stored in Secrets Manager. Which IAM permission is required?
- s3:GetObject
- secretsmanager:GetSecretValue
- dynamodb:Scan
- cloudwatch:PutMetricData only
Correct Answer: 2
Explanation
The Lambda execution role needs permission to call Secrets Manager’s GetSecretValue API when the function retrieves a stored secret at runtime. The permission should be restricted to the specific secret whenever practical to follow least-privilege principles. The application can use the AWS SDK to retrieve the secret without embedding the secret value directly in source code. The other permissions listed provide access to unrelated AWS services or operations. Granting secretsmanager:GetSecretValue to the appropriate secret allows the Lambda function to retrieve the sensitive value securely according to the IAM policy.
Question 134
A developer wants to send application events to multiple consumers, with each consumer receiving its own copy of the event. Which architecture should be used?
- SNS topic with separate subscriptions
- One shared DynamoDB item
- One SQS queue consumed by every application
- A single Lambda function for all processing
Correct Answer: 1
Explanation
An SNS topic with separate subscriptions supports a publish/subscribe fanout architecture. When a publisher sends a message to the topic, each subscription can receive a copy of that message. Separate SQS queues can also be subscribed to the SNS topic, allowing consumers to process messages independently and asynchronously. In contrast, multiple consumers reading from the same SQS queue compete for messages rather than each receiving a copy. A single Lambda function creates tighter coupling between processing responsibilities. SNS fanout is therefore appropriate when multiple independent consumers need to receive the same event.
Question 135
A developer needs to ensure that a Lambda function does not consume all available account concurrency and impact other functions. Which setting should be configured?
- Reserved concurrency
- Lambda layer
- Function URL
- Environment variable
Correct Answer: 1
Explanation
Lambda reserved concurrency limits the maximum number of concurrent executions for a function. Setting a limit can prevent one function from consuming excessive account-level concurrency and affecting other workloads. Reserved concurrency can also guarantee a certain amount of concurrency for a function, depending on the account configuration and available limits. Layers manage shared dependencies, function URLs provide HTTP endpoints, and environment variables provide runtime configuration. Reserved concurrency is therefore useful when developers need to control a function’s maximum concurrent execution level and isolate its impact on other Lambda workloads.
Question 136
A developer wants to retrieve an object from S3 using a temporary URL generated by an application. Which HTTP operation is commonly used with the generated presigned download URL?
- GET
- DELETE
- PATCH
- TRACE
Correct Answer: 1
Explanation
A presigned S3 download URL commonly authorizes an HTTP GET request for a specific object. The application generates the URL using credentials with appropriate permissions and specifies an expiration period. The client can then use the URL to retrieve the object without receiving AWS credentials. Presigned URLs can also be generated for other supported operations, such as uploads using PUT, depending on the application’s requirements. GET is the normal HTTP operation for retrieving an object. DELETE, PATCH, and TRACE are not the standard operation used for a presigned S3 object download.
Question 137
A developer wants to deploy a new Lambda version gradually and shift traffic between two versions. Which feature supports this requirement?
- Lambda aliases
- S3 Versioning
- DynamoDB Streams
- CloudWatch Logs
Correct Answer: 1
Explanation
Lambda aliases can point to published Lambda versions and support controlled traffic shifting between versions. A deployment can initially send a portion of traffic to a new version while the remainder continues using the previous version. This allows developers to monitor errors and performance before increasing traffic to the new release. S3 Versioning manages object versions, DynamoDB Streams captures item changes, and CloudWatch Logs stores execution logs. Lambda aliases therefore provide an important mechanism for managing controlled deployments and traffic distribution between function versions.
Question 138
A developer wants to create an application that can continue processing messages even if one consumer temporarily becomes unavailable. Which architecture is appropriate?
- Amazon SQS queue between the producer and consumer
- Direct synchronous calls only
- Shared local file storage
- Hardcoded application dependencies
Correct Answer: 1
Explanation
Amazon SQS provides durable asynchronous messaging that can decouple producers from consumers. Messages remain in the queue until they are successfully processed or otherwise handled according to the queue configuration. If a consumer becomes temporarily unavailable, messages can remain available for another consumer or for the original consumer after recovery. This improves resilience compared with direct synchronous communication, where the producer may immediately fail when the consumer is unavailable. SQS also supports visibility timeouts and dead-letter queues for handling processing failures. A queue-based architecture is therefore useful when producers and consumers need independent availability.
Question 139
A developer needs to store application logs generated by a Lambda function and search them for specific messages. Which service should be used?
- Amazon CloudWatch Logs
- Amazon ECR
- Amazon Route 53
- Amazon Cognito
Correct Answer: 1
Explanation
Amazon CloudWatch Logs stores logs generated by Lambda functions and provides tools for viewing and searching log data. Developers can use log groups and streams to organize function output and investigate application behavior. CloudWatch Logs can also be queried and integrated with other monitoring capabilities. ECR stores container images, Route 53 provides DNS services, and Cognito provides identity management. CloudWatch Logs is therefore the appropriate service for centralized Lambda application logging and troubleshooting. Developers should avoid writing sensitive credentials or confidential information to application logs because logs can persist and may be accessible to authorized users.
Question 140
A developer wants to create a reusable infrastructure template that defines a Lambda function, IAM role, and DynamoDB table together. Which AWS service is appropriate?
- AWS CloudFormation
- Amazon CloudFront
- Amazon SQS
- AWS Secrets Manager
Correct Answer: 1
Explanation
AWS CloudFormation allows developers to define multiple AWS resources in an infrastructure template and manage them together as a stack. A template can define a Lambda function, its IAM role, a DynamoDB table, and dependencies between these resources. This infrastructure-as-code approach makes deployments repeatable and helps maintain consistency between environments. CloudFront provides content delivery, SQS provides message queuing, and Secrets Manager stores sensitive information. CloudFormation is therefore appropriate when a developer wants to package related infrastructure resources into a reusable and automated deployment definition.