exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 123 discussion

A company must deploy all its Amazon RDS DB instances by using AWS CloudFormation templates as part of AWS CodePipeline continuous integration and continuous delivery (CI/CD) automation. The primary password for the DB instance must be automatically generated as part of the deployment process.

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

  • A. Create an AWS Lambda-backed CloudFormation custom resource. Write Lambda code that generates a secure string. Return the value of the secure string as a data field of the custom resource response object. Use the CloudFormation Fn::GetAtt intrinsic function to get the value of the secure string. Use the value to create the DB instance.
  • B. Use the AWS CodeBuild action of CodePipeline to generate a secure string by using the following AWS CLI command: aws secretsmanager get-random-password. Pass the generated secure string as a CloudFormation parameter with the NoEcho attribute set to true. Use the parameter reference to create the DB instance.
  • C. Create an AWS Lambda-backed CloudFormation custom resource. Write Lambda code that generates a secure string. Return the value of the secure string as a data field of the custom resource response object. Use the CloudFormation Fn::GetAtt intrinsic function to get a value of the secure string. Create secrets in AWS Secrets Manager. Use the secretsmanager dynamic reference to use the value stored in the secret to create the DB instance.
  • D. Use the AWS::SecretsManager::Secret resource to generate a secure string. Store the secure string as a secret in AWS Secrets Manager. Use the secretsmanager dynamic reference to use the value stored in the secret to create the DB instance.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MrTee
Highly Voted 2 years ago
Its a difficult choice between B and D Option B leverages the existing AWS CLI command to generate a secure string, and then passes it as a parameter to CloudFormation, where it can be used to create the DB instance. But, if the use of Secrets Manager is already part of the organization's infrastructure, and the setup has already been completed, then option D may indeed be the simplest solution.
upvoted 7 times
...
sumanshu
Most Recent 4 months ago
Selected Answer: D
A) Eliminated - This approach requires writing and maintaining custom Lambda code, which adds development effort. B) Eliminated - This requires some setup in CodeBuild and manual handling of parameters, which adds complexity. C) Eliminated - Same as option A (Reason) D) Correct - Secrets Manager handles password generation and rotation automatically. This approach uses native CloudFormation functionality with no custom code.
upvoted 1 times
sumanshu
2 months, 2 weeks ago
D) Resources: MyDBPassword: Type: AWS::SecretsManager::Secret Properties: Name: MyDBPasswordSecret GenerateSecretString: PasswordLength: 16 ExcludeCharacters: '"@/' RequireEachIncludedType: true IncludeSpace: false
upvoted 1 times
sumanshu
2 months, 2 weeks ago
B) Eliminated - In Option B, the password is generated but not stored securely in any service (like Secrets Manager), which means you'd lose access to it after creation. This makes it problematic for future access to the database.
upvoted 1 times
...
...
...
Saudis
7 months, 2 weeks ago
Selected Answer: D
Ans is B because the keyword is automatically generate passwords by secret manger by lest effort
upvoted 1 times
...
65703c1
11 months, 1 week ago
Selected Answer: D
D is the correct answer.
upvoted 1 times
...
maurice2005
1 year, 1 month ago
Selected Answer: B
Where is the automatic generating of the password in option D?
upvoted 2 times
...
SerialiDr
1 year, 3 months ago
Selected Answer: D
D. Use the AWS::SecretsManager::Secret resource to generate a secure string. Store the secure string as a secret in AWS Secrets Manager. Use the secretsmanager dynamic reference to use the value stored in the secret to create the DB instance: This solution efficiently uses AWS CloudFormation's native integration with AWS Secrets Manager. The AWS::SecretsManager::Secret resource type in CloudFormation can generate a secure string and store it as a secret. The secret value can then be used directly in the CloudFormation template to set the RDS instance password, using the secretsmanager dynamic reference. This approach minimizes development effort and leverages existing AWS services.
upvoted 3 times
...
fagilom
1 year, 4 months ago
D: This option leverages a native CloudFormation resource specifically designed for secret management. It eliminates the need for custom code or external tools, making it the simplest and most effort-efficient solution. This approach minimizes custom code and utilizes native CloudFormation features, reducing overall complexity and maintenance.
upvoted 1 times
...
chewasa
1 year, 4 months ago
Selected Answer: D
you can create secrets with AWS::SecretsManager::Secret so it is the correct answer.
upvoted 2 times
...
LR2023
1 year, 4 months ago
Selected Answer: D
I was dilly dallying between B and D....but this helped me solidify my answer choice https://docs.aws.amazon.com/secretsmanager/latest/userguide/cfn-example_reference-secret.html
upvoted 1 times
...
dezoito
1 year, 6 months ago
Selected Answer: D
With AWS CloudFormation, you can retrieve a secret to use in another AWS CloudFormation resource. A common scenario is to first create a secret with a password generated by Secrets Manager, and then retrieve the username and password from the secret to use as credentials for a new database. https://docs.aws.amazon.com/secretsmanager/latest/userguide/cfn-example_reference-secret.html
upvoted 2 times
...
love777
1 year, 8 months ago
Selected Answer: B
Option B provides a straightforward approach to generating a secure string for the DB instance password and using it in CloudFormation with minimal development effort. Here's why this option is efficient: CodeBuild Action: Using the AWS CodeBuild action within CodePipeline to generate a secure string using the aws secretsmanager get-random-password command allows you to easily create a random password without writing custom Lambda code. CloudFormation Parameter: You can pass the generated secure string as a CloudFormation parameter with the NoEcho attribute set to true. This ensures that the parameter value won't be exposed in CloudFormation outputs or logs.
upvoted 4 times
...
FunkyFresco
1 year, 11 months ago
Selected Answer: D
The correct option is D. Create the password from secrets manager.
upvoted 4 times
...
delak
1 year, 11 months ago
Selected Answer: D
yes it's D
upvoted 2 times
...
rlnd2000
1 year, 11 months ago
Selected Answer: D
The answer is D This is a secretsmanager dynamic reference sample in cloud formation
upvoted 2 times
...
chumji
1 year, 11 months ago
I think answer is D https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-rds-integration-aws-secrets-manager/
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago