Question 1 of 30
A company is using AWS CloudFormation to manage its infrastructure as code. They have a stack that provisions an Amazon EC2 instance, an Amazon RDS database, and an Amazon S3 bucket. The company wants to ensure that the EC2 instance can access the RDS database securely without exposing it to the public internet. Which of the following configurations should the company implement in their CloudFormation template to achieve this goal?
Create a security group for the EC2 instance that allows outbound traffic to the RDS database's security group and ensure the RDS database is in a private subnet.
Configure the RDS database to allow public access and set the EC2 instance's security group to allow inbound traffic from any IP address.
Use an IAM role for the EC2 instance that grants it permissions to access the RDS database and place both resources in a public subnet.
Set up a VPN connection between the EC2 instance and the RDS database to allow secure communication over the internet.

Preparing for Amazon DVA-C02 AWS Certified Developer – Associate (DVA-C02)? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free