How should the web application be setup with RDS?
Create a VPC with one public and one private subnet. Launch an application instance in the public subnet while RDS is launched in the private subnet.
Setup a public and two private subnets in different AZs within a VPC and create a subnet group. Launch RDS with that subnet group.
Create a network interface and attach two subnets to it. Attach that network interface with RDS while launching a DB instance.
Create two separate VPCs and launch a Web app in one VPC and RDS in a separate VPC and connect them with VPC peering.
Explanations:
While this setup has an application instance in a public subnet and RDS in a private subnet, it does not utilize multiple Availability Zones (AZs) for high availability, which is recommended for production databases.
This option provides a well-architected solution by using a public subnet for the application and two private subnets in different AZs for RDS, which enhances high availability and disaster recovery. Creating a subnet group for RDS ensures that it can utilize the private subnets effectively.
RDS does not support attaching network interfaces to multiple subnets directly; instead, it uses a subnet group to define which subnets can be used. Therefore, this setup is not valid.
Using separate VPCs for the web application and RDS increases complexity and latency due to VPC peering and does not align with best practices for security and performance, as both should ideally reside within the same VPC.