ExamGecko
Home Home / Amazon / DVA-C02

Amazon DVA-C02 Practice Test - Questions Answers, Page 18

Question list
Search
Search

List of questions

Search

Related questions











A company has a web application that runs on Amazon EC2 instances with a custom Amazon Machine Image (AMI) The company uses AWS CloudFormation to provision the application The application runs in the us-east-1 Region, and the company needs to deploy the application to the us-west-1 Region

An attempt to create the AWS CloudFormation stack in us-west-1 fails. An error message states that the AMI ID does not exist. A developer must resolve this error with a solution that uses the least amount of operational overhead

Which solution meets these requirements?

A.
Change the AWS CloudFormation templates for us-east-1 and us-west-1 to use an AWS AMI. Relaunch the stack for both Regions.
A.
Change the AWS CloudFormation templates for us-east-1 and us-west-1 to use an AWS AMI. Relaunch the stack for both Regions.
Answers
B.
Copy the custom AMI from us-east-1 to us-west-1. Update the AWS CloudFormation template for us-west-1 to refer to AMI ID for the copied AMI Relaunch the stack
B.
Copy the custom AMI from us-east-1 to us-west-1. Update the AWS CloudFormation template for us-west-1 to refer to AMI ID for the copied AMI Relaunch the stack
Answers
C.
Build the custom AMI in us-west-1 Create a new AWS CloudFormation template to launch the stack in us-west-1 with the new AMI ID
C.
Build the custom AMI in us-west-1 Create a new AWS CloudFormation template to launch the stack in us-west-1 with the new AMI ID
Answers
D.
Manually deploy the application outside AWS CloudFormation in us-west-1.
D.
Manually deploy the application outside AWS CloudFormation in us-west-1.
Answers
Suggested answer: B

Explanation:

Problem: CloudFormation can't find the custom AMI in the target region (us-west-1) because AMIs are region-specific.

Copying AMIs:

AMIs can be copied across regions, maintaining their configuration.

This approach minimizes operational overhead as the existing CloudFormation template can be reused with a minor update.

Updating the Template:

Modify the CloudFormation template in us-west-1 to reference the newly copied AMI's ID in that region.

Copying AMIs:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html

CloudFormation Templates and AMIs:[invalid URL removed]

A company is creating an application that processes csv files from Amazon S3 A developer has created an S3 bucket The developer has also created an AWS Lambda function to process the csv files from the S3 bucket

Which combination of steps will invoke the Lambda function when a csv file is uploaded to Amazon S3? (Select TWO.)

A.
Create an Amazon EventBridge rule Configure the rule with a pattern to match the S3 object created event
A.
Create an Amazon EventBridge rule Configure the rule with a pattern to match the S3 object created event
Answers
B.
Schedule an Amazon EventBridge rule to run a new Lambda function to scan the S3 bucket.
B.
Schedule an Amazon EventBridge rule to run a new Lambda function to scan the S3 bucket.
Answers
C.
Add a trigger to the existing Lambda function. Set the trigger type to EventBridge Select the Amazon EventBridge rule.
C.
Add a trigger to the existing Lambda function. Set the trigger type to EventBridge Select the Amazon EventBridge rule.
Answers
D.
Create a new Lambda function to scan the S3 bucket for recently added S3 objects
D.
Create a new Lambda function to scan the S3 bucket for recently added S3 objects
Answers
E.
Add S3 Lifecycle rules to invoke the existing Lambda function
E.
Add S3 Lifecycle rules to invoke the existing Lambda function
Answers
Suggested answer: A, E

Explanation:

Amazon EventBridge:A service that reacts to events from various AWS sources, including S3. Rules define which events trigger actions (like invoking Lambda functions).

S3 Object Created Events:EventBridge can detect these, providing seamless integration for automated CSV processing.

S3 Lifecycle Rules:Allow for actions based on object age or prefixes. These can directly trigger Lambda functions for file processing.

Amazon EventBridge Documentation:https://docs.aws.amazon.com/eventbridge/

Working with S3 Event Notifications:https://docs.aws.amazon.com/AmazonS3/latest/userguide/EventNotifications.html

S3 Lifecycle Configuration:https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html

A developer is creating an AWS Lambda function in VPC mode An Amazon S3 event will invoke the Lambda function when an object is uploaded into an S3 bucket The Lambda function will process the object and produce some analytic results that will be recorded into a file Each processed object will also generate a log entry that will be recorded into a file.

Other Lambda functions. AWS services, and on-premises resources must have access to the result files and log file. Each log entry must also be appended to the same shared log file. The developer needs a solution that can share files and append results into an existing file.

Which solution should the developer use to meet these requirements?

A.
Create an Amazon Elastic File System (Amazon EFS) file system. Mount the EFS file system in Lambda. Store the result files and log file in the mount point. Append the log entries to the log file.
A.
Create an Amazon Elastic File System (Amazon EFS) file system. Mount the EFS file system in Lambda. Store the result files and log file in the mount point. Append the log entries to the log file.
Answers
B.
Create an Amazon Elastic Block Store (Amazon EBS) Multi-Attach enabled volume Attach the EBS volume to all Lambda functions. Update the Lambda function code to download the log file, append the log entries, and upload the modified log file to Amazon EBS
B.
Create an Amazon Elastic Block Store (Amazon EBS) Multi-Attach enabled volume Attach the EBS volume to all Lambda functions. Update the Lambda function code to download the log file, append the log entries, and upload the modified log file to Amazon EBS
Answers
C.
Create a reference to the /tmp local directory. Store the result files and log file by using the directory reference. Append the log entry to the log file.
C.
Create a reference to the /tmp local directory. Store the result files and log file by using the directory reference. Append the log entry to the log file.
Answers
D.
Create a reference to the /opt storage directory Store the result files and log file by using the directory reference Append the log entry to the log file
D.
Create a reference to the /opt storage directory Store the result files and log file by using the directory reference Append the log entry to the log file
Answers
Suggested answer: A

Explanation:

Amazon EFS:A network file system (NFS) providing shared, scalable storage across multiple Lambda functions and other AWS resources.

Lambda Mounting:EFS file systems can be mounted within Lambda functions to access a shared storage space.

Log Appending:EFS supports appending data to existing files, making it ideal for the log file scenario.

Amazon EFS Documentation:https://docs.aws.amazon.com/efs/

Using Amazon EFS with AWS Lambda:https://docs.aws.amazon.com/lambda/latest/dg/services-efs.html

A company hosts its application on AWS. The application runs on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. The cluster runs behind an Application Load Balancer The application stores data in an Amazon Aurora database A developer encrypts and manages database credentials inside the application

The company wants to use a more secure credential storage method and implement periodic credential rotation.

Which solution will meet these requirements with the LEAST operational overhead?

A.
Migrate the secret credentials to Amazon RDS parameter groups. Encrypt the parameter by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation. Use 1AM policies and roles to grant AWS KMS permissions to access Amazon RDS.
A.
Migrate the secret credentials to Amazon RDS parameter groups. Encrypt the parameter by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation. Use 1AM policies and roles to grant AWS KMS permissions to access Amazon RDS.
Answers
B.
Migrate the credentials to AWS Systems Manager Parameter Store. Encrypt the parameter by using an AWS Key Management Service (AWS KMS) key. Turn on secret rotation. Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager
B.
Migrate the credentials to AWS Systems Manager Parameter Store. Encrypt the parameter by using an AWS Key Management Service (AWS KMS) key. Turn on secret rotation. Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager
Answers
C.
Migrate the credentials to ECS Fargate environment variables. Encrypt the credentials by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation. Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager.
C.
Migrate the credentials to ECS Fargate environment variables. Encrypt the credentials by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation. Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager.
Answers
D.
Migrate the credentials to AWS Secrets Manager. Encrypt the credentials by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager by using keys.
D.
Migrate the credentials to AWS Secrets Manager. Encrypt the credentials by using an AWS Key Management Service (AWS KMS) key Turn on secret rotation Use 1AM policies and roles to grant Amazon ECS Fargate permissions to access to AWS Secrets Manager by using keys.
Answers
Suggested answer: D

Explanation:

Secrets Management:AWS Secrets Manager is designed specifically for storing and managing sensitive credentials.

Built-in Rotation:Secrets Manager provides automatic secret rotation functionality, enhancing security posture significantly.

IAM Integration:IAM policies and roles grant fine-grained access to ECS Fargate, ensuring the principle of least privilege.

Reduced Overhead:This solution centralizes secrets management and automates rotation, reducing operational overhead compared to the other options.

AWS Secrets Manager:https://aws.amazon.com/secrets-manager/

Secrets Manager Rotation:https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html

IAM for Secrets Manager:https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_iam-policies.html

A developer is testing a RESTful application that is deployed by using Amazon API Gateway and AWS Lambda When the developer tests the user login by using credentials that are not valid, the developer receives an HTTP 405 METHOD_NOT_ALLOWED error The developer has verified that the test is sending the correct request for the resource

Which HTTP error should the application return in response to the request?

A.
HTTP 401
A.
HTTP 401
Answers
B.
HTTP 404
B.
HTTP 404
Answers
C.
HTTP 503
C.
HTTP 503
Answers
D.
HTTP 505
D.
HTTP 505
Answers
Suggested answer: A

Explanation:

HTTP Status Codes:Each HTTP status code has a specific meaning in RESTful APIs.

HTTP 405 (Method Not Allowed):Indicates that the request method (e.g., POST) is not supported for the specified resource.

HTTP 401 (Unauthorized):Represents a failure to authenticate, which is the appropriate response for invalid login credentials.

HTTP Status Codes:https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

A company runs an application on AWS The application uses an AWS Lambda function that is configured with an Amazon Simple Queue Service (Amazon SQS) queue called high priority queue as the event source A developer is updating the Lambda function with another SQS queue called low priority queue as the event source The Lambda function must always read up to 10 simultaneous messages from the high priority queue before processing messages from low priority queue. The Lambda function must be limited to 100 simultaneous invocations.

Which solution will meet these requirements'?

A.
Set the event source mapping batch size to 10 for the high priority queue and to 90 for the low priority queue
A.
Set the event source mapping batch size to 10 for the high priority queue and to 90 for the low priority queue
Answers
B.
Set the delivery delay to 0 seconds for the high priority queue and to 10 seconds for the low priority queue
B.
Set the delivery delay to 0 seconds for the high priority queue and to 10 seconds for the low priority queue
Answers
C.
Set the event source mapping maximum concurrency to 10 for the high priority queue and to 90 for the low priority queue
C.
Set the event source mapping maximum concurrency to 10 for the high priority queue and to 90 for the low priority queue
Answers
D.
Set the event source mapping batch window to 10 for the high priority queue and to 90 for the low priority queue
D.
Set the event source mapping batch window to 10 for the high priority queue and to 90 for the low priority queue
Answers
Suggested answer: C

Explanation:

Lambda Concurrency:The 'maximum concurrency' setting in event source mappings controls the maximum number of simultaneous invocations Lambda allows for that specific source.

Prioritizing Queues:Setting a lower maximum concurrency for the 'high priority queue' ensures it's processed first while allowing more concurrent invocations from the 'low priority queue'.

Batching:Batch size settings affect the number of messages Lambda retrieves from a queue per invocation, which is less relevant to the prioritization requirement.

Lambda Event Source Mappings:https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html

Lambda Concurrency:https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html

A developer deployed an application to an Amazon EC2 instance The application needs to know the public IPv4 address of the instance

How can the application find this information?

A.
Query the instance metadata from http://169.254.169.254. latestmeta-data/.
A.
Query the instance metadata from http://169.254.169.254. latestmeta-data/.
Answers
B.
Query the instance user data from http '169 254.169 254. latest/user-data/
B.
Query the instance user data from http '169 254.169 254. latest/user-data/
Answers
C.
Query the Amazon Machine Image (AMI) information from http://169.254.169.254/latest/meta-data/ami/.
C.
Query the Amazon Machine Image (AMI) information from http://169.254.169.254/latest/meta-data/ami/.
Answers
D.
Check the hosts file of the operating system
D.
Check the hosts file of the operating system
Answers
Suggested answer: A

Explanation:

Instance Metadata Service:EC2 instances have access to an internal metadata service. It provides instance-specific information like instance ID, security groups, and public IP address.

Accessing Metadata:

Make an HTTP GET request to the base URL:http://169.254.169.254/latest/meta-data/

You'll get a list of available categories. The public IPv4 address is underpublic-ipv4.

Instance Metadata and User Data:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html

A company has a web application that is hosted on Amazon EC2 instances The EC2 instances are configured to stream logs to Amazon CloudWatch Logs The company needs to receive an Amazon Simple Notification Service (Amazon SNS) notification when the number of application error messages exceeds a defined threshold within a 5-minute period

Which solution will meet these requirements?

A.
Rewrite the application code to stream application logs to Amazon SNS Configure an SNS topic to send a notification when the number of errors exceeds the defined threshold within a 5-minute period
A.
Rewrite the application code to stream application logs to Amazon SNS Configure an SNS topic to send a notification when the number of errors exceeds the defined threshold within a 5-minute period
Answers
B.
Configure a subscription filter on the CloudWatch Logs log group. Configure the filter to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period.
B.
Configure a subscription filter on the CloudWatch Logs log group. Configure the filter to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period.
Answers
C.
Install and configure the Amazon Inspector agent on the EC2 instances to monitor for errors Configure Amazon Inspector to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period
C.
Install and configure the Amazon Inspector agent on the EC2 instances to monitor for errors Configure Amazon Inspector to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period
Answers
D.
Create a CloudWatch metric filter to match the application error pattern in the log data. Set up a CloudWatch alarm based on the new custom metric. Configure the alarm to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period.
D.
Create a CloudWatch metric filter to match the application error pattern in the log data. Set up a CloudWatch alarm based on the new custom metric. Configure the alarm to send an SNS notification when the number of errors exceeds the defined threshold within a 5-minute period.
Answers
Suggested answer: D

Explanation:

CloudWatch for Log Analysis:CloudWatch is the best fit here because logs are already centralized. Here's the process:

Metric Filter: Create a metric filter on the CloudWatch Logs log group. Design a pattern to specifically identify application error messages.

Custom Metric: This filter generates a new custom CloudWatch metric (e.g.,ApplicationErrors). This metric tracks the error count.

CloudWatch Alarm: Create an alarm on theApplicationErrorsmetric. Configure the alarm with your desired threshold and a 5-minute evaluation period.

SNS Action: Set the alarm to trigger an SNS notification when it enters the alarm state.

CloudWatch Metric Filters:https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/MonitoringLogData.html

CloudWatch Alarms:https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html

A developer is creating a service that uses an Amazon S3 bucket for image uploads. The service will use an AWS Lambda function to create a thumbnail of each image Each time an image is uploaded the service needs to send an email notification and create the thumbnail The developer needs to configure the image processing and email notifications setup.

Which solution will meet these requirements?

A.
Create an Amazon Simple Notification Service (Amazon SNS) topic Configure S3 event notifications with a destination of the SNS topic Subscribe the Lambda function to the SNS topic Create an email notification subscription to the SNS topic
A.
Create an Amazon Simple Notification Service (Amazon SNS) topic Configure S3 event notifications with a destination of the SNS topic Subscribe the Lambda function to the SNS topic Create an email notification subscription to the SNS topic
Answers
B.
Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications with a destination of the SNS topic. Subscribe the Lambda function to the SNS topic. Create an Amazon Simple Queue Service (Amazon SQS) queue Subscribe the SQS queue to the SNS topic Create an email notification subscription to the SQS queue.
B.
Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure S3 event notifications with a destination of the SNS topic. Subscribe the Lambda function to the SNS topic. Create an Amazon Simple Queue Service (Amazon SQS) queue Subscribe the SQS queue to the SNS topic Create an email notification subscription to the SQS queue.
Answers
C.
Create an Amazon Simple Queue Service (Amazon SQS) queue Configure S3 event notifications with a destination of the SQS queue Subscribe the Lambda function to the SQS queue Create an email notification subscription to the SQS queue.
C.
Create an Amazon Simple Queue Service (Amazon SQS) queue Configure S3 event notifications with a destination of the SQS queue Subscribe the Lambda function to the SQS queue Create an email notification subscription to the SQS queue.
Answers
D.
Create an Amazon Simple Queue Service (Amazon SQS) queue. Send S3 event notifications to Amazon EventBridge. Create an EventBndge rule that runs the Lambda function when images are uploaded to the S3 bucket Create an EventBridge rule that sends notifications to the SQS queue Create an email notification subscription to the SQS queue
D.
Create an Amazon Simple Queue Service (Amazon SQS) queue. Send S3 event notifications to Amazon EventBridge. Create an EventBndge rule that runs the Lambda function when images are uploaded to the S3 bucket Create an EventBridge rule that sends notifications to the SQS queue Create an email notification subscription to the SQS queue
Answers
Suggested answer: A

Explanation:

SNS as a Fan-out Mechanism:SNS is perfect for triggering multiple actions from a single event (here, the image upload).

Workflow:

SNS Topic:Create an SNS topic that will be the central notification point.

S3 Event Notification:Configure the S3 bucket to send 'Object Created' event notifications to the SNS topic.

Lambda Subscription:Subscribe your thumbnail-creating Lambda function to the SNS topic.

Email Subscription:Subscribe an email address to the SNS topic to trigger notifications.

S3 Event Notifications:https://docs.aws.amazon.com/AmazonS3/latest/userguide/EventNotifications.html

SNS Subscriptions:https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html

A developer is building a microservices-based application by using Python on AWS and several AWS services The developer must use AWS X-Ray The developer views the service map by using the console to view the service dependencies. During testing, the developer notices that some services are missing from the service map

What can the developer do to ensure that all services appear in the X-Ray service map?

A.
Modify the X-Ray Python agent configuration in each service to increase the sampling rate
A.
Modify the X-Ray Python agent configuration in each service to increase the sampling rate
Answers
B.
Instrument the application by using the X-Ray SDK for Python. Install the X-Ray SDK for all the services that the application uses
B.
Instrument the application by using the X-Ray SDK for Python. Install the X-Ray SDK for all the services that the application uses
Answers
C.
Enable X-Ray data aggregation in Amazon CloudWatch Logs for all the services that the application uses
C.
Enable X-Ray data aggregation in Amazon CloudWatch Logs for all the services that the application uses
Answers
D.
Increase the X-Ray service map timeout value in the X-Ray console
D.
Increase the X-Ray service map timeout value in the X-Ray console
Answers
Suggested answer: B

Explanation:

AWS X-Ray SDK:The primary way to enable X-Ray tracing within applications. The SDK sends data about requests and subsegments to the X-Ray daemon for service map generation.

Instrumenting All Services:To visualize a complete microservice architecture on the service map, each relevant service must include the X-Ray SDK.

AWS X-Ray Documentation:https://docs.aws.amazon.com/xray/

X-Ray SDK for Python:https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-python.html

Total 292 questions
Go to page: of 30