Q78 — AWS SAA-C03 Ch.12
Question 78 of 100 | ← Chapter 12
Q878. A company is planning to run a group of Amazon EC2 instances that connect to an Amazon Aurora database. The company has built an AWS CloudFormation template to deploy the EC2 instances and the Aurora DB cluster. The company wants to allow the instances to authenticate to the database in a secure way. The company does not want to maintain static database credentials.Which solution meets these requirements with the LEAST operational effort?
- A. Create a database user with a user name and password. Add parameters for the database user name and password to the CloudFormation template. Pass the parameters to the EC2 instances when the instances are launched.
- B. Create a database user with a user name and password. Store the user name and password in AWS Systems Manager Parameter Store. Configure the EC2 instances to retrieve the database credentials from Parameter Store.
- C. Configure the DB cluster to use IAM database authentication. Create a database user to use with IAM authentication. Associate a role with the EC2 instances to allow applications on the instances to access the database. ✓
- D. Configure the DB cluster to use IAM database authentication with an IAM user. Create a database user that has a name that matches the IAM user. Associate the IAM user with the EC2 instances to allow applications on the instances to access the database.
Correct Answer: C. Configure the DB cluster to use IAM database authentication. Create a database user to use with IAM authentication. Associate a role with the EC2 instances to allow applications on the instances to access the database.
Explanation
Yes, the correct answer is C: Configure the DB cluster to use IAM database authentication. Create a database user to use with IAM authentication. Associate a role with the EC2 instances to allow applications on the instances to access the database.By configuring the Aurora DB cluster to use IAM database authentication, the instances can authenticate to the database using their IAM role credentials, eliminating the need for static database credentials. This provides a secure and convenient authentication mechanism.Option A suggests creating a database user with a username and password and passing those credentials as parameters in the CloudFormation template. This would require managing and securing the credentials, which goes against the requirement of not maintaining static database credentials.Option B suggests storing the database credentials in AWS Systems Manager Parameter Store and configuring the EC2 instances to retrieve them. While this reduces the effort of managing credentials, it still involves storing and managing static database credentials.Option D suggests using IAM database authentication with an IAM user. While this provides a secure authentication mechanism, it requires creating an IAM user specifically for database authentication and associating it with the EC2 instances. This adds complexity and additional management overhead.Therefore, option C is the best solution as it allows the instances to authenticate using IAM database authentication without the need for static credentials or additional management effort.