AWS Certified Developer Associate DVA-C01 – Question300

A company is developing a report executed by AWS Step Functions. Amazon CloudWatch shows errors in the Step Functions task state machine. To troubleshoot each task, the state input needs to be included along with the error message in the state output.
Which coding practice can preserve both the original input and the error for the state?

A.
Use ResultPath in a Catch statement to include the error with the original input.
B. Use InputPath in a Catch statement and set the value to null.
C. Use ErrorEquals in a Retry statement to include the error with the original input.
D. Use OutputPath in a Retry statement and set the value to $.

Correct Answer: A

Explanation:

Explanation: Use ResultPath in a Catch to include the error with the original input. Reference: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-r…

AWS Certified Developer Associate DVA-C01 – Question299

Given the following AWS CloudFormation template:

What is the MOST efficient way to reference the new Amazon S3 bucket from another AWS CloudFormation template?

A.
Add an Export declaration to the Outputs section of the original template and use ImportValue in other templates.
B. Add Exported: true to the Contentbucket in the original template and use ImportResource in other templates.
C. Create a custom AWS CloudFormation resource that gets the bucket name from the ContentBucket resource of the first stack.
D. Use Fn::Include to include the existing template in other templates and use the ContentBucket resource directly.

Correct Answer: C

AWS Certified Developer Associate DVA-C01 – Question298

A developer is using AWS CodeDeploy to deploy an application running on Amazon EC2. The developer wants to change the file permissions for a specific deployment file.
Which lifecycle event should a developer use to meet this requirement?

A.
AfterInstall
B. DownloadBundle
C. BeforeInstall
D. ValidateService

Correct Answer: A

Explanation:

Explanation: You can use the AfterInstall deployment lifecycle event for tasks such as configuring your application or changing file permissions. Reference: https://aws.amazon.com/codedeploy/faqs/

AWS Certified Developer Associate DVA-C01 – Question297

A gaming application stores scores for players in an Amazon DynamoDB table that has four attributes: user_id, user_name, user_score, and user_rank. The users are allowed to update their names only. A user is authenticated by web identity federation.
Which set of conditions should be added in the policy attached to the role for the dynamodb: PutItem API call?

A.

B.
C.
D.

Correct Answer: C

AWS Certified Developer Associate DVA-C01 – Question296

A development team is designing a mobile app that requires multi-factor authentication.
Which steps should be taken to achieve this? (Choose two.)

A.
Use Amazon Cognito to create a user pool and create users in the user pool.
B. Send multi-factor authentication text codes to users with the Amazon SNS Publish API call in the app code.
C. Enable multi-factor authentication for the Amazon Cognito user pool.
D. Use AWS IAM to create IAM users.
E. Enable multi-factor authentication for the users created in AWS IAM.

Correct Answer: CE

Explanation:

AWS Certified Developer Associate DVA-C01 – Question295

A developer is creating a script to automate the deployment process for a serverless application. The developer wants to use an existing AWS Serverless Application Model (AWS SAM) template for the application.
What should the developer use for the project? (Choose two.)

A.
Call aws cloudformation package to create the deployment package. Call aws cloudformation deploy to deploy the package afterward.
B. Call sam package to create the deployment package. Call sam deploy to deploy the package afterward.
C. Call aws s3 cp to upload the AWS SAM template to Amazon S3. Call aws lambda update-function-code to create the application.
D. Create a ZIP package locally and call aws serverlessrepo create-application to create the application.
E. Create a ZIP package and upload it to Amazon S3. Call aws cloudformation create-stack to create the application.

AWS Certified Developer Associate DVA-C01 – Question294

A developer is using Amazon DynamoDB to store application data. The developer wants to further improve application performance by reducing response times for read and write operations.
Which DynamoDB feature should be used to meet these requirements?

A.
Amazon DynamoDB Streams
B. Amazon DynamoDB Accelerator
C. Amazon DynamoDB global tables
D. Amazon DynamoDB transactions

AWS Certified Developer Associate DVA-C01 – Question293

A developer added a new feature to an application running on an Amazon EC2 instance that uses Amazon SQS. After deployment, the developer noticed a significant increase in Amazon SQS costs. When monitoring the Amazon SQS metrics on Amazon CloudWatch, the developer found that on average one message per minute is posted on this queue.
What can be done to reduce Amazon SQS costs for this application?

A.
Increase the Amazon SQS queue polling timeout.
B. Scale down the Amazon SQS queue to the appropriate size for low traffic demand.
C. Configure push delivery via Amazon SNS instead of polling the Amazon SQS queue.
D. Use an Amazon SQS first-in, first-out (FIFO) queue instead of a standard queue.

Correct Answer: A

AWS Certified Developer Associate DVA-C01 – Question292

A developer has written an AWS Lambda function using Java as the runtime environment. The developer wants to isolate a performance bottleneck in the code. Which steps should be taken to reveal the bottleneck?

A.
Use the Amazon CloudWatch API to write timestamps to a custom CloudWatch metric. Use the CloudWatch console to analyze the resulting data.
B. Use the AWS X-Ray API to write trace data into X-Ray from strategic places within the code. Use the Amazon CloudWatch console to analyze the resulting data.
C. Use the AWS X-Ray API to write trace data into X-Ray from strategic places within the code. Use the X-Ray console to analyze the resulting data.
D. Use the Amazon CloudWatch API to write timestamps to a custom CloudWatch metric. Use the AWS X-Ray console to analyze the resulting data.

Correct Answer: B

Explanation:

AWS Certified Developer Associate DVA-C01 – Question291

Two containerized microservices are hosted on Amazon EC2 ECS. The first microservice reads an Amazon RDS Aurora database instance, and the second microservice reads an Amazon DynamoDB table.
How can each microservice be granted the minimum privileges?

A.
Set ECS_ENABLE_TASK_IAM_ROLE to false on EC2 instance boot in ECS agent configuration file. Run the first microservice with an IAM role for ECS tasks with read-only access for the Aurora database. Run the second microservice with an IAM role for ECS tasks with read-only access to DynamoDB.
B. Set ECS_ENABLE_TASK_IAM_ROLE to false on EC2 instance boot in the ECS agent configuration file. Grant the instance profile role read-only access to the Aurora database and DynamoDB.
C. Set ECS_ENABLE_TASK_IAM_ROLE to true on EC2 instance boot in the ECS agent configuration file. Run the first microservice with an IAM role for ECS tasks with read-only access for the Aurora database. Run the second microservice with an IAM role for ECS tasks with read-only access to DynamoDB.
D. Set ECS_ENABLE_TASK_IAM_ROLE to true on EC2 instance boot in the ECS agent configuration file. Grant the instance profile role read-only access to the Aurora database and DynamoDB.