Q23 — AWS DVA-C02 Ch.2
Question 23 of 100 | ← Chapter 2
A developer manages multiple AWS accounts. Each account contains an Amazon RDS database instance deployed within a private VPC. The developer needs to create and manage identical database users consistently across all databases. The solution must ensure the same users are created and updated identically in every account. Which solution meets these requirements with the highest operational efficiency?
- A. Create an AWS CloudFormation template. Declare users in the template and attach them to the database. Deploy the template in each account.
- B. Create an AWS CloudFormation template with a custom resource to create users in the database. Deploy the template in each account. ✓
- C. Write a script to create users. Deploy an Amazon EC2 instance in each account to run the script against the database. Run the script in each account.
- D. Implement an AWS Lambda function to create users in the database. Provide details for all three accounts to the function.
Correct Answer: B. Create an AWS CloudFormation template with a custom resource to create users in the database. Deploy the template in each account.
Explanation
Option B uses an AWS CloudFormation template with a custom resource to programmatically create and update database users. This ensures consistency, repeatability, and infrastructure-as-code governance across accounts without manual intervention. Option A requires hardcoding user definitions per template, increasing maintenance overhead and inconsistency risk. Options C and D introduce unnecessary infrastructure (EC2 or Lambda) and cross-account management complexity, raising cost and operational burden. Thus, Option B delivers the highest operational efficiency.