DVA-C02-demo

pdf

School

Union County Vocational Technical School *

*We aren’t endorsed by this school

Course

A&P 1

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

7

Uploaded by GrandSnake1071

Report
Vendor: Amazon Exam Code: DVA-C02 Exam Name: AWS Certified Developer - Associate Version: Demo
QUESTION 1 A company is using an Amazon API Gateway REST API endpoint as a webhook to publish events from an on-premises source control management (SCM) system to Amazon EventBridge. The company has configured an EventBridge rule to listen for the events and to control application deployment in a central AWS account. The company needs to receive the same events across multiple receiver AWS accounts. How can a developer meet these requirements without changing the configuration of the SCM system? A. Deploy the API Gateway REST API to all the required AWS accounts. Use the same custom domain name for all the gateway endpoints so that a single SCM webhook can be used for all events from all accounts. B. Deploy the API Gateway REST API to all the receiver AWS accounts. Create as many SCM webhooks as the number of AWS accounts. C. Grant permission to the central AWS account for EventBridge to access the receiver AWS accounts. Add an EventBridge event bus on the receiver AWS accounts as the targets to the existing EventBridge rule. D. Convert the API Gateway type from REST API to HTTP API. Correct Answer: C https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-account.html QUESTION 2 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? (Choose two.) A. Create an Amazon EventBridge rule. Configure the rule with a pattern to match the S3 object created event. B. Schedule an Amazon EventBridge rule to run a new Lambda function to scan the S3 bucket. C. Add a trigger to the existing Lambda function. Set the trigger type to EventBridge. Select the Amazon EventBridge rule. D. Create a new Lambda function to scan the S3 bucket for recently added S3 objects. E. Add S3 Lifecycle rules to invoke the existing Lambda function. Correct Answer: AC QUESTION 3 A developer is creating an application for a company. The application needs to read the file doc.txt that is placed in the root folder of an Amazon S3 bucket that is named DOC-EXAMPLE-BUCKET. The company\\'s security team requires the principle of least privilege to be applied to the application\\'s IAM policy.
Which IAM policy statement will meet these security requirements? A. Option A B. Option B C. Option C D. Option D Correct Answer: A
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
QUESTION 4 A developer is using AWS Amplify Hosting to build and deploy an application. The developer is receiving an increased number of bug reports from users. The developer wants to add end-to-end testing to the application to eliminate as many bugs as possible before the bugs reach production. Which solution should the developer implement to meet these requirements? A. Run the amplify add test command in the Amplify CLI. B. Create unit tests in the application. Deploy the unit tests by using the amplify push command in the Amplify CLI. C. Add a test phase to the amplify.yml build settings for the application. D. Add a test phase to the aws-exports.js file for the application. Correct Answer: C https://docs.aws.amazon.com/amplify/latest/userguide/running-tests.html QUESTION 5 A company is using AWS CloudFormation to deploy a two-tier application. The application will use Amazon RDS as its backend database. The company wants a solution that will randomly generate the database password during deployment. The solution also must automatically rotate the database password without requiring changes to the application. What is the MOST operationally efficient solution that meets these requirements? A. Use an AWS Lambda function as a CloudFormation custom resource to generate and rotate the password. B. Use an AWS Systems Manager Parameter Store resource with the SecureString data type to generate and rotate the password. C. Use a cron daemon on the application\\'s host to generate and rotate the password. D. Use an AWS Secrets Manager resource to generate and rotate the password. Correct Answer: D QUESTION 6 A developer wants to insert a record into an Amazon DynamoDB table as soon as a new file is added to an Amazon S3 bucket. Which set of steps would be necessary to achieve this? A. Create an event with Amazon EventBridge that will monitor the S3 bucket and then insert the records into DynamoDB. B. Configure an S3 event to invoke an AWS Lambda function that inserts records into DynamoDB. C. Create an AWS Lambda function that will poll the S3 bucket and then insert the records into DynamoDB.
D. Create a cron job that will run at a scheduled time and insert the records into DynamoDB. Correct Answer: B QUESTION 7 A developer is creating an AWS Lambda function that consumes messages from an Amazon Simple Queue Service (Amazon SQS) standard queue. The developer notices that the Lambda function processes some messages multiple times. How should developer resolve this issue MOST cost-effectively? A. Change the Amazon SQS standard queue to an Amazon SQS FIFO queue by using the Amazon SQS message deduplication ID. B. Set up a dead-letter queue. C. Set the maximum concurrency limit of the AWS Lambda function to 1 D. Change the message processing to use Amazon Kinesis Data Streams instead of Amazon SQS. Correct Answer: A Explanation: Amazon Simple Queue Service (Amazon SQS) is a fully managed queue service that allows you to de- couple and scale for applications1. Amazon SQS offers two types of queues: Standard and FIFO (First In First Out) queues1. The FIFO queue uses the messageDeduplicationId property to treat messages with the same value as duplicate2. Therefore, changing the Amazon SQS standard queue to an Amazon SQS FIFO queue using the Amazon SQS message deduplication ID can help resolve the issue of the Lambda function processing some messages multiple times. Therefore, option A is correct. QUESTION 8 A developer is planning to use an Amazon API Gateway and AWS Lambda to provide a REST API. The developer will have three distinct environments to manage: development, test, and production. How should the application be deployed while minimizing the number of resources to manage? A. Create a separate API Gateway and separate Lambda function for each environment in the same Region. B. Assign a Region for each environment and deploy API Gateway and Lambda to each Region. C. Create one API Gateway with multiple stages with one Lambda function with multiple aliases. D. Create one API Gateway and one Lambda function, and use a REST parameter to identify the environment. Correct Answer: C QUESTION 9 A developer is developing an application that uses signed requests (Signature Version 4) to call other AWS services. The developer has created a canonical request, has created the string to sign, and has calculated signing information.
Which methods could the developer use to complete a signed request? (Choose two.) A. Add the signature to an HTTP header that is named Authorization. B. Add the signature to a session cookie. C. Add the signature to an HTTP header that is named Authentication. D. Add the signature to a query string parameter that is named X-Amz-Signature. E. Add the signature to an HTTP header that is named WWW-Authenticate. Correct Answer: AD https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html QUESTION 10 An ecommerce company is using an AWS Lambda function behind Amazon API Gateway as its application tier. To process orders during checkout, the application calls a POST API from the frontend. The POST API invokes the Lambda function asynchronously. In rare situations, the application has not processed orders. The Lambda application logs show no errors or failures. What should a developer do to solve this problem? A. Inspect the frontend logs for API failures. Call the POST API manually by using the requests from the log file. B. Create and inspect the Lambda dead-letter queue. Troubleshoot the failed functions. Reprocess the events. C. Inspect the Lambda logs in Amazon CloudWatch for possible errors. Fix the errors. D. Make sure that caching is disabled for the POST API in API Gateway. Correct Answer: B https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html Asynchronous invocation – Lambda retries function errors twice. If the function doesn\\'t have enough capacity to handle all incoming requests, events might wait in the queue for hours or days to be sent to the function. You can configure a dead-letter queue on the function to capture events that weren\\'t successfully processed. QUESTION 11 A company has an application that runs as a series of AWS Lambda functions. Each Lambda function receives data from an Amazon Simple Notification Service (Amazon SNS) topic and writes the data to an Amazon Aurora DB instance. To comply with an information security policy, the company must ensure that the Lambda functions all use a single securely encrypted database connection string to access Aurora. Which solution will meet these requirements? A. Use IAM database authentication for Aurora to enable secure database connections for all the Lambda functions.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
B. Store the credentials and read the credentials from an encrypted Amazon RDS DB instance. C. Store the credentials in AWS Systems Manager Parameter Store as a secure string parameter. D. Use Lambda environment variables with a shared AWS Key Management Service (AWS KMS) key for encryption. Correct Answer: D QUESTION 12 An online sales company is developing a serverless application that runs on AWS. The application uses an AWS Lambda function that calculates order success rates and stores the data in an Amazon DynamoDB table. A developer wants an efficient way to invoke the Lambda function every 15 minutes. Which solution will meet this requirement with the LEAST development effort? A. Create an Amazon EventBridge rule that has a rate expression that will run the rule every 15 minutes. Add the Lambda function as the target of the EventBridge rule. B. Create an AWS Systems Manager document that has a script that will invoke the Lambda function on Amazon EC2. Use a Systems Manager Run Command task to run the shell script every 15 minutes. C. Create an AWS Step Functions state machine. Configure the state machine to invoke the Lambda function execution role at a specified interval by using a Wait state. Set the interval to 15 minutes. D. Provision a small Amazon EC2 instance. Set up a cron job that invokes the Lambda function every 15 minutes. Correct Answer: B Powered by TCPDF (www.tcpdf.org)