Pass the Amazon Web Services AWS Certified Associate DVA-C02 Questions and answers with CertsForce

Viewing page 8 out of 11 pages
Viewing questions 71-80 out of questions
Questions # 71:

A developer is writing an application to analyze the traffic to a fleet of Amazon EC2 instances. The EC2 instances run behind a public Application Load Balancer (ALB). An HTTP server runs on each of the EC2 instances, logging all requests to a log file.

The developer wants to capture the client public IP addresses. The developer analyzes the log files and notices only the IP address of the ALB.

What must the developer do to capture the client public IP addresses in the log file?

Options:

A.

Add a Host header to the HTTP server log configuration file.


B.

Install the Amazon CloudWatch Logs agent on each EC2 instance. Configure the agent to write to the log file.


C.

Install the AWS X-Ray daemon on each EC2 instance. Configure the daemon to write to the log file.


D.

Add an X-Forwarded-For header to the HTTP server log configuration file.


Expert Solution
Questions # 72:

A developer is building a web application that uses Amazon API Gateway to expose an AWS Lambda function to process requests from clients. During testing, the developer notices that the API Gateway times out even though the Lambda function finishes under the set time limit.

Which of the following API Gateway metrics in Amazon CloudWatch can help the developer troubleshoot the issue? (Choose two.)

Options:

A.

CacheHitCount


B.

IntegrationLatency


C.

CacheMissCount


D.

Latency


E.

Count


Expert Solution
Questions # 73:

A developer uses AWS CloudFormation to deploy an Amazon API Gateway API and an AWS Step Functions state machine The state machine must reference the API Gateway API after the CloudFormation template is deployed The developer needs a solution that uses the state machine to reference the API Gateway endpoint.

Which solution will meet these requirements MOST cost-effectively?

Options:

A.

Configure the CloudFormation template to reference the API endpoint in the DefinitionSubstitutions property for the AWS StepFunctions StateMachme resource.


B.

Configure the CloudFormation template to store the API endpoint in an environment variable for the AWS::StepFunctions::StateMachine resourc Configure the state machine to reference the environment variable


C.

Configure the CloudFormation template to store the API endpoint in a standard AWS: SecretsManager Secret resource Configure the state machine to reference the resource


D.

Configure the CloudFormation template to store the API endpoint in a standard AWS::AppConfig;:ConfigurationProfile resource Configure the state machine to reference

the resource.


Expert Solution
Questions # 74:

An application that is hosted on an Amazon EC2 instance needs access to files that are stored in an Amazon S3 bucket. The application lists the objects that are stored in the S3 bucket and displays a table to the user. During testing, a developer discovers that the application does not show any objects in the list.

What is the MOST secure way to resolve this issue?

Options:

A.

Update the IAM instance profile that is attached to the EC2 instance to include the S3:* permission for the S3 bucket.


B.

Update the IAM instance profile that is attached to the EC2 instance to include the S3:ListBucket permission for the S3 bucket.


C.

Update the developer's user permissions to include the S3:ListBucket permission for the S3 bucket.


D.

Update the S3 bucket policy by including the S3:ListBucket permission and by setting the Principal element to specify the account number of the EC2 instance.


Expert Solution
Questions # 75:

When a developer tries to run an AWS Code Build project, it raises an error because the length of all environment variables exceeds the limit for the combined maximum of characters.

What is the recommended solution?

Options:

A.

Add the export LC-_ALL" on _ US, tuft" command to the pre _ build section to ensure POSIX Localization.


B.

Use Amazon Cognate to store key-value pairs for large numbers of environment variables


C.

Update the settings for the build project to use an Amazon S3 bucket for large numbers of environment variables


D.

Use AWS Systems Manager Parameter Store to store large numbers ot environment variables


Expert Solution
Questions # 76:

A developer is writing unit tests tor a new application that will be deployed on AWS. The developer wants to validate all pull requests with unit tests and merge the code with the main branch only when all tests pass

The developer stores the code in AWS CodeCommit and sets up AWS CodeBuild to run the unit tests. The developer creates an AWS Lambda function to start the CodeBuild task. The developer needs to identify the CodeCommit events in an Amazon EventBridge event that can invoke the Lambda function when a pull request is created or updated.

Which CodeCommit event will meet these requirements?

Question # 76

Options:

A.

Option A


B.

Option B


C.

Option C


D.

Option D


Expert Solution
Questions # 77:

An application that is deployed to Amazon EC2 is using Amazon DynamoDB. The app cation calls the DynamoDB REST API Periodically the application receives a ProvisionedThroughputExceededException error when the application writes to a DynamoDB table.

Which solutions will mitigate this error MOST cost-effectively^ (Select TWO)

Options:

A.

Modify the application code to perform exponential back off when the error is received.


B.

Modify the application to use the AWS SDKs for DynamoDB.


C.

Increase the read and write throughput of the DynamoDB table.


D.

Create a DynamoDB Accelerator (DAX) cluster for the DynamoDB table.


E.

Create a second DynamoDB table Distribute the reads and writes between the two tables.


Expert Solution
Questions # 78:

A company needs to distribute firmware updates to its customers around the world.

Which service will allow easy and secure control of the access to the downloads at the lowest cost?

Options:

A.

Use Amazon CloudFront with signed URLs for Amazon S3.


B.

Create a dedicated Amazon CloudFront Distribution for each customer.


C.

Use Amazon CloudFront with AWS Lambda@Edge.


D.

Use Amazon API Gateway and AWS Lambda to control access to an S3 bucket.


Expert Solution
Questions # 79:

A company offers a business-to-business software service that runs on dedicated infrastructure deployed in each customer's AWS account. Before a feature release, the company needs to run integration tests on real AWS test infrastructure. The test infrastructure consists of Amazon EC2 instances and an Amazon RDS database.

A developer must set up a continuous delivery process that will provision the test infrastructure across the different AWS accounts. The developer then must run the integration tests.

Which solution will meet these requirements with the LEAST administrative effort?

Options:

A.

Use AWS CodeDeploy with AWS CloudFormation StackSets to deploy the infrastructure. Use Amazon CodeGuru to run the tests.


B.

Use AWS CodePipeline with AWS CloudFormation StackSets to deploy the infrastructure. Use AWS CodeBuild to run the tests.


C.

Use AWS CodePipeline with AWS CloudFormation change sets to deploy the infrastructure. Use a CloudFormation custom resource to run the tests.


D.

Use AWS Serverless Application Model (AWS SAM) templates with AWS CloudFormation change sets to deploy the infrastructure. Use AWS CodeDeploy to run the tests.


Expert Solution
Questions # 80:

A developer is modifying an AWS Lambda function that accesses an Amazon RDS for MySQL database. The developer discovers that the Lambda function has the database credentials stored as plaintext in the Lambda function code.

The developer must implement a solution to make the credentials more secure. The solution must include automated credential rotation every 30 days.

Which solution will meet these requirements?

Options:

A.

Move the credentials to a secret in AWS Secrets Manager. Modify the Lambda function to read from Secrets Manager. Set a schedule to rotate the secret every 30 days.


B.

Move the credentials to a secure string parameter in AWS Systems Manager Parameter Store. Modify the Lambda function to read from Parameter Store. Set a schedule to rotate the parameter every 30 days.


C.

Move the credentials to an encrypted Amazon S3 bucket. Modify the Lambda function to read from the S3 bucket. Configure S3 Object Lambda to rotate the credentials every 30 days.


D.

Move the credentials to a secure string parameter in AWS Systems Manager Parameter Store. Create an Amazon EventBridge rule to rotate the parameter every 30 days.


Expert Solution
Viewing page 8 out of 11 pages
Viewing questions 71-80 out of questions