Amazon DVA-C02 Practice Test - Questions Answers, Page 19
List of questions
Question 181
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A developer is creating an AWS Lambda function. The Lambda function needs an external library to connect to a third-party solution The external library is a collection of files with a total size of 100 MB The developer needs to make the external library available to the Lambda execution environment and reduce the Lambda package space
Which solution will meet these requirements with the LEAST operational overhead?
Explanation:
Lambda Layers:These are designed to package dependencies that you can share across functions.
How to Use:
Create a layer, upload your 100MB library as a zip.
Attach the layer to your function.
In your function code, import the library from the standard layer path.
Lambda Layers:https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
Question 182
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A company built an online event platform For each event the company organizes quizzes and generates leaderboards that are based on the quiz scores. The company stores the leaderboard data in Amazon DynamoDB and retains the data for 30 days after an event is complete The company then uses a scheduled job to delete the old leaderboard data
The DynamoDB table is configured with a fixed write capacity. During the months when many events occur, the DynamoDB write API requests are throttled when the scheduled delete job runs.
A developer must create a long-term solution that deletes the old leaderboard data and optimizes write throughput
Which solution meets these requirements?
Explanation:
DynamoDB TTL (Time-to-Live):A native feature that automatically deletes items after a specified expiration time.
Efficiency:Eliminates the need for scheduled deletion jobs, optimizing write throughput by avoiding potential throttling conflicts.
Seamless Integration:TTL works directly within DynamoDB, requiring minimal development overhead.
DynamoDB TTL Documentation:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html
Question 183
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A developer must use multi-factor authentication (MFA) to access data in an Amazon S3 bucket that is in another AWS account. Which AWS Security Token Service (AWS STS) API operation should the developer use with the MFA information to meet this requirement?
Explanation:
AWS STS AssumeRole:The central operation for assuming temporary security credentials, commonly used for cross-account access.
MFA Integration:TheAssumeRolecall can include MFA information to enforce multi-factor authentication.
Credentials for S3 Access:The returned temporary credentials would provide the necessary permissions to access the S3 bucket in the other account.
AWS STS AssumeRole Documentation:https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html
Question 184
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A company has an analytics application that uses an AWS Lambda function to process transaction data asynchronously A developer notices that asynchronous invocations of the Lambda function sometimes fail When failed Lambda function invocations occur, the developer wants to invoke a second Lambda function to handle errors and log details.
Which solution will meet these requirements?
Explanation:
Lambda Destinations on Failure:Allow routing asynchronous function invocations to specified resources (like another Lambda function) upon failure.
Error Handling:The error-handling Lambda receives details about the failure, enabling logging and custom actions.
Direct Integration:This solution leverages native Lambda functionality for a simpler implementation.
Question 185
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A company is preparing to migrate an application to the company's first AWS environment Before this migration, a developer is creating a proof-of-concept application to validate a model for building and deploying container-based applications on AWS.
Which combination of steps should the developer take to deploy the containerized proof-of-concept application with the LEAST operational effort? (Select TWO.)
Explanation:
Containerization:Packaging the application as a container image promotes portability and standardization. Docker is the standard tool for containerization.
Amazon ECR:ECR is a managed container registry designed to work seamlessly with AWS container services.
Fargate:ECS Fargate provides serverless container orchestration, minimizing operational overhead for this proof-of-concept.
Docker:https://www.docker.com/
Amazon ECR:https://aws.amazon.com/ecr/
Question 186
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A company runs an application on AWS The application stores data in an Amazon DynamoDB table Some queries are taking a long time to run These slow queries involve an attribute that is not the table's partition key or sort key
The amount of data that the application stores in the DynamoDB table is expected to increase significantly. A developer must increase the performance of the queries.
Which solution will meet these requirements'?
Explanation:
Global Secondary Index (GSI):GSIs enable alternative query patterns on a DynamoDB table by using different partition and sort keys.
Addressing Query Bottleneck:By making the slow-query attribute the GSI's partition key, you optimize queries on that attribute.
Scalability:GSIs automatically scale to handle increasing data volumes.
Amazon DynamoDB Global Secondary Indexes:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html
Question 187
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A developer maintains a critical business application that uses Amazon DynamoDB as the primary data store The DynamoDB table contains millions of documents and receives 30-60 requests each minute The developer needs to perform processing in near-real time on the documents when they are added or updated in the DynamoDB table
How can the developer implement this feature with the LEAST amount of change to the existing application code?
Explanation:
DynamoDB Streams:Capture near real-time changes to DynamoDB tables, triggering downstream actions.
Lambda for Processing:Lambda functions provide a serverless way to execute code in response to events like DynamoDB Stream updates.
Minimal Code Changes:This solution requires the least modifications to the existing application.
DynamoDB Streams:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html
AWS Lambda:https://aws.amazon.com/lambda/
Question 188
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A developer needs to build an AWS CloudFormation template that self-populates the AWS Region variable that deploys the CloudFormation template
What is the MOST operationally efficient way to determine the Region in which the template is being deployed?
Explanation:
Pseudo Parameters:CloudFormation provides pseudo parameters that reference runtime context, including the current AWS Region.
Operational Efficiency:TheAWS::Regionpseudo parameter offers the most direct and self-contained way to obtain the Region dynamically within the template.
CloudFormation Pseudo Parameters:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html
Question 189
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A company has an application that runs across multiple AWS Regions. The application is experiencing performance issues at irregular intervals. A developer must use AWS X-Ray to implement distributed tracing for the application to troubleshoot the root cause of the performance issues.
What should the developer do to meet this requirement?
Explanation:
Distributed Tracing with X-Ray:X-Ray helps visualize request paths and identify bottlenecks in applications distributed across Regions.
Region Annotations (Automatic for AWS Services):X-Ray automatically adds a Region annotation to segments representing calls to AWS services. This aids in tracing cross-Region traffic.
Region Annotations (Manual for User-Defined):For segments representing calls to user-defined services in different Regions, the developer needs to add the Region annotation manually to enable comprehensive tracing.
AWS X-Ray:https://aws.amazon.com/xray/
Question 190
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
A company has a social media application that receives large amounts of traffic User posts and interactions are continuously updated in an Amazon RDS database The data changes frequently, and the data types can be complex The application must serve read requests with minimal latency
The application's current architecture struggles to deliver these rapid data updates efficiently The company needs a solution to improve the application's performance.
Which solution will meet these requirements'?
Explanation:
Amazon ElastiCache for Redis:An in-memory data store known for extremely low latency, ideal for caching frequently accessed, complex data.
Write-Through Caching:Ensures that data is always consistent between the cache and the database. Writes go to both Redis and RDS.
Performance Gains:Redis handles reads with minimal latency, offloading the RDS database and improving the application's responsiveness.
Amazon ElastiCache for Redis Documentation:https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/
Caching Strategies:https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Strategies.html
Question