Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: force70

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

Viewing page 6 out of 12 pages
Viewing questions 76-90 out of questions
Questions # 76:

A team of developed is using an AWS CodePipeline pipeline as a continuous integration and continuous delivery (CI/CD) mechanism for a web application. A developer has written unit tests to programmatically test the functionality of the application code. The unit tests produce a test report that shows the results of each individual check. The developer now wants to run these tests automatically during the CI/CD process.

Options:

A.

Write a Git pre-commit hook that runs the test before every commit. Ensure that each developer who is working on the project has the pre-commit hook instated locally. Review the test report and resolve any issues before pushing changes to AWS CodeCommit.


B.

Add a new stage to the pipeline. Use AWS CodeBuild as the provider. Add the new stage after the stage that deploys code revisions to the test environment. Write a buildspec that fails the CodeBuild stage if any test does not pass. Use the test reports feature of Codebuild to integrate the report with the CodoBuild console. View the test results in CodeBuild Resolve any issues.


C.

Add a new stage to the pipeline. Use AWS CodeBuild at the provider. Add the new stage before the stage that deploys code revisions to the test environment. Write a buildspec that fails the CodeBuild stage it any test does not pass. Use the test reports feature of CodeBuild to integrate the report with the CodeBuild console. View the test results in codeBuild Resolve any issues.


D.

Add a new stage to the pipeline. Use Jenkins as the provider. Configure CodePipeline to use Jenkins to run the unit tests. Write a Jenkinsfile that fails the stage if any test does not pass. Use the test report plugin for Jenkins to integrate the repot with the Jenkins dashboard. View the test results in Jenkins. Resolve any issues.


Expert Solution
Questions # 77:

A developer is writing a serverless application that requires an AWS Lambda function to be invoked every 10 minutes.

What is an automated and serverless way to invoke the function?

Options:

A.

Deploy an Amazon EC2 instance based on Linux, and edit its /etc/confab file by adding a command to periodically invoke the lambda function


B.

Configure an environment variable named PERIOD for the Lambda function. Set the value to 600.


C.

Create an Amazon EventBridge rule that runs on a regular schedule to invoke the Lambda function.


D.

Create an Amazon Simple Notification Service (Amazon SNS) topic that has a subscription to the Lambda function with a 600-second timer.


Expert Solution
Questions # 78:

A company uses Amazon API Gateway to expose a set of APIs to customers. The APIs have caching enabled in API Gateway. Customers need a way to invalidate the cache for each API when they test the API.

What should a developer do to give customers the ability to invalidate the API cache?

Options:

A.

Ask the customers to use AWS credentials to call the InvalidateCache API operation.


B.

Attach an InvalidateCache policy to the IAM execution role that the customers use to invoke the API. Ask the customers to send a request that contains the HTTP header when they make an API call.


C.

Ask the customers to use the AWS SDK API Gateway class to invoke the InvalidateCache API operation.


D.

Attach an InvalidateCache policy to the IAM execution role that the customers use to invoke the API. Ask the customers to add the INVALIDATE_CACHE query string parameter when they make an API call.


Expert Solution
Questions # 79:

A company has a serverless application that uses Amazon API Gateway backed by AWS Lambda proxy integration. The company is developing several backend APIs. The company needs a landing page to provide an overview of navigation to the APIs.

A developer creates a new /LandingPage resource and a new GET method that uses mock integration.

What should the developer do next to meet these requirements?

Options:

A.

Configure the integration request mapping template with Content-Type of text/html and statusCode of 200. Configure the integration response mapping template with Content-Type of application/json. In the integration response mapping template, include the LandingPage HTML code that references the APIs.


B.

Configure the Integration request mapping template with Content-Type of application/json. In the integration request mapping template, include the LandingPage HMTL code that references the APIs. Configure the integration response mapping template with Content-Type of text/html and statusCode of 200.


C.

Configure the integration request mapping template with Content-Type of application/json and statusCode of 200. Configure the integration response mapping template with Content-Type of text/html. In the integration response mapping template, include the LandingPage HTML code that references the APIs.


D.

Configure the integration request mapping template with Content-Type of text/html. In the integration request mapping template, include the LandingPage HTML code that references the APIs. Configure the integration response mapping template with Content-Type of application/json and statusCode of 200.


Expert Solution
Questions # 80:

A company notices that credentials that the company uses to connect to an external software as a service (SaaS) vendor are stored in a configuration file as plaintext.

The developer needs to secure the API credentials and enforce automatic credentials rotation on a quarterly basis.

Which solution will meet these requirements MOST securely?

Options:

A.

Use AWS Key Management Service (AWS KMS) to encrypt the configuration file. Decrypt the configuration file when users make API calls to the SaaS vendor. Enable rotation.


B.

Retrieve temporary credentials from AWS Security Token Service (AWS STS) every 15 minutes. Use the temporary credentials when users make API calls to the SaaS vendor.


C.

Store the credentials in AWS Secrets Manager and enable rotation. Configure the API to have Secrets Manager access.


D.

Store the credentials in AWS Systems Manager Parameter Store and enable rotation. Retrieve the credentials when users make API calls to the SaaS vendor.


Expert Solution
Questions # 81:

A company is building a content authoring application. The application has multiple user groups, such as content creator, reviewer, approver, and administrator. The company needs to assign users fine-grained permissions for specific parts of the application.

The company needs a solution to configure, maintain, and analyze user permissions. The company wants a solution that can be easily adapted to work with newer applications in the future. The company must use a third-party OpenID Connect (OIDC) identity provider (IdP) to authenticate users.

Options:

A.

Configure an Amazon Cognito identity pool for the application. Use the identity pool identities within the application to manage user permissions.


B.

Configure the application to check user permissions upon request. Configure the application logic to manage user permissions.


C.

Use Amazon Verified Permissions to set up user permissions. Integrate Verified Permissions with a third-party IdP. Configure the application to request authorization decisions from Verified Permissions.


D.

Set up an IAM role for each user group. Assign users appropriate IAM roles. Configure the application to determine appropriate permissions for each user based on the user ' s IAM role.


Expert Solution
Questions # 82:

A developer is migrating a containerized application from an on-premises environment to the AWS Cloud. The developer is using the AWS CDK to provision a container in Amazon ECS on AWS Fargate. The container is behind an Application Load Balancer (ALB).

When the developer deploys the stack, the deployment fails because the ALB fails health checks. The developer needs to resolve the failed health checks.

Which solutions will meet this requirement? (Select TWO.)

Options:

A.

Confirm that the capacity providers for the container have been provisioned and are properly sized.


B.

Confirm that the target group port matches the port mappings in the ECS task definition.


C.

Confirm that a hosted zone associated with the ALB matches a hosted zone that is referenced in the ECS task definition.


D.

Confirm that the ALB listener on the mapped port has a default action that redirects to the application ' s health check path endpoint.


E.

Confirm that the ALB listener on the mapped port has a default action that forwards to the correct target group.


Expert Solution
Questions # 83:

A developer is creating a mobile app that calls a backend service by using an Amazon API Gateway REST API. For integration testing during the development phase, the developer wants to simulate different backend responses without invoking the backend service.

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

Options:

A.

Create an AWS Lambda function. Use API Gateway proxy integration to return constant HTTP responses.


B.

Create an Amazon EC2 instance that serves the backend REST API by using an AWS CloudFormation template.


C.

Customize the API Gateway stage to select a response type based on the request.


D.

Use a request mapping template to select the mock integration response.


Expert Solution
Questions # 84:

A company runs a new application on AWS Elastic Beanstalk. The company needs to deploy updates to the application. The updates must not cause any downtime for application users. The deployment must forward a specified percentage of incoming client traffic to a new application version during an evaluation period.

Which deployment type will meet these requirements?

Options:

A.

Rolling


B.

Traffic-splitting


C.

In-place


D.

Immutable


Expert Solution
Questions # 85:

A developer has implemented an AWS Lambda function that inserts new customers into an Amazon RDS database. The function is expected to run hundreds of times each hour. The function and RDS database are in the same VPC. The function is configured to use 512 MB of RAM and is based on the following pseudocode:

def lambda_handler(event, context):

db = database.connect()

db.statement( " INSERT INTO Customers (CustomerName) VALUES (%s) " , event.name)

db.execute()

db.close()

After successfully testing the function multiple times, the developer notices that the execution time is longer than expected.

What should the developer do to improve performance?

Options:

A.

Increase the reserved concurrency of the Lambda function.


B.

Increase the size of the RDS database to facilitate an increased number of database connections each hour.


C.

Move the database connection and close statement out of the handler. Place the connection in the global space.


D.

Replace Amazon RDS with Amazon DynamoDB to implement control over the number of writes per second.


Expert Solution
Questions # 86:

A company uses more than 100 AWS Lambda functions to handle application services. One Lambda function is critical and must always run successfully. The company notices that occasionally, the critical Lambda function does not initiate. The company investigates the issue and discovers instances of the Lambda TooManyRequestsException: Rate Exceeded error in Amazon CloudWatch logs. Upon further review of the logs, the company notices that some of the non-critical functions run properly while the critical function fails. A developer must resolve the errors and ensure that the critical Lambda function runs successfully. Which solution will meet these requirements with the LEAST operational overhead?

Options:

A.

Configure reserved concurrency for the critical Lambda function. Set reserved concurrent executions to the appropriate level.


B.

Configure provisioned concurrency for the critical Lambda function. Set provisioned concurrent executions to the appropriate level.


C.

Configure CloudWatch alarms for TooManyRequestsException errors. Add the critical Lambda function as an alarm state change action to invoke the critical function again after a failure.


D.

Configure CloudWatch alarms for TooManyRequestsException errors. Add Amazon EventBridge as an action for the alarm state change. Use EventBridge to invoke the critical function again after a failure.


Expert Solution
Questions # 87:

A company needs to deploy all its cloud resources by using AWS CloudFormation templates A developer must create an Amazon Simple Notification Service (Amazon SNS) automatic notification to help enforce this rule. The developer creates an SNS topic and subscribes the email address of the company ' s security team to the SNS topic.

The security team must receive a notification immediately if an 1AM role is created without the use of CloudFormation.

Which solution will meet this requirement?

Options:

A.

Create an AWS Lambda function to filter events from CloudTrail if a role was created without CloudFormation Configure the Lambda function to publish to the SNS topic. Create an Amazon EventBridge schedule to invoke the Lambda function every 15 minutes


B.

Create an AWS Fargate task in Amazon Elastic Container Service (Amazon ECS) to filter events from CloudTrail if a role was created without CloudFormation Configure the Fargate task to publish to the SNS topic Create an Amazon EventBridge schedule to run the Fargate task every 15 minutes


C.

Launch an Amazon EC2 instance that includes a script to filter events from CloudTrail if a role was created without CloudFormation. Configure the script to publish to the SNS topic. Create a cron job to run the script on the EC2 instance every 15 minutes.


D.

Create an Amazon EventBridge rule to filter events from CloudTrail if a role was created without CloudFormation Specify the SNS topic as the target of the EventBridge rule.


Expert Solution
Questions # 88:

A company deploys a new application to AWS. The company is streaming application logs to Amazon CloudWatch Logs. The company ' s development team must receive notification by email when the word " ERROR " appears in any log lines. A developer sets up an Amazon SNS topic and subscribes the development team to the topic.

What should the developer do next to meet the requirements?

Options:

A.

Select the appropriate log group. Create a CloudWatch metric filter with " ERROR " as the search term. Create an alarm on this metric that notifies the SNS topic when the metric is 1 or higher.


B.

In CloudWatch Logs Insights, select the appropriate log group. Create a metric query to search for the term " ERROR " in the logs. Create an alarm on this metric that notifies the SNS topic when the metric is 1 or higher.


C.

Select the appropriate log group. Create an SNS subscription filter with " ERROR " as the filter pattern. Select the SNS topic as the destination.


D.

Create a CloudWatch alarm that includes " ERROR " as a filter pattern, a log group dimension that defines the appropriate log group, and a destination that notifies the SNS topic.


Expert Solution
Questions # 89:

A company stores customer credit reports in an Amazon S3 bucket. An analytics service uses standard Amazon S3 GET requests to access the reports.

A developer must implement a solution to redact personally identifiable information (PII) from the reports before the reports reach the analytics service.

Which solution will meet this requirement with the MOST operational efficiency?

Options:

A.

Load the S3 objects into Amazon Redshift by using a COPY command. Implement dynamic data masking. Refactor the analytics service to read from Amazon Redshift.


B.

Set up an S3 Object Lambda function. Attach the function to an S3 Object Lambda Access Point. Program the function to call a PII redaction API.


C.

Use AWS KMS to implement encryption in the S3 bucket. Re-upload all the existing S3 objects. Give the kms:Decrypt permission to the analytics service.


D.

Create an Amazon SNS topic. Implement message data protection. Refactor the analytics service to publish data access requests to the SNS topic.


Expert Solution
Questions # 90:

An application uses an Amazon API Gateway API that is integrated with an AWS Lambda function. Specific API requests are returning the HTTP 504 (Gateway Timeout) error message. The Lambda function is configured with a 20-second timeout. The API Gateway integration is configured with a 15-second timeout and a rate of 10 requests every second. There are no errors in the logs for the Lambda function. Which solution will prevent the HTTP 504 error responses?

Options:

A.

Increase the reserved concurrency of the Lambda function.


B.

Increase the timeout of the Lambda function.


C.

Increase the timeout of the API Gateway integration.


D.

Increase the per-client throttling limit.


Expert Solution
Viewing page 6 out of 12 pages
Viewing questions 76-90 out of questions