QuestionQ94

VerifiedInfrastructure Security

A company runs an Amazon RDS Multi-AZ DB instance in a VPC. The DB instance uses two subnets that have a default route to the internet through a NAT gateway.

The company also has application servers running on Amazon EC2 instances that use the RDS database. The company deployed these EC2 instances in two other private subnets in the same VPC. These EC2 instances use a default route through the same NAT gateway to reach the internet. Each subnet in the VPC has its own distinct route table.

After a recent security audit, the company introduced a new security requirement: the DB instance must never be able to connect to the internet. A security engineer must implement this change immediately without disrupting the application servers' network traffic.

How can the security engineer satisfy these requirements?

Explanation

A private subnet reaches the internet through a NAT gateway only when its subnet route table contains a default route to that NAT gateway. Removing the default route from the DB subnets’ route tables blocks internet egress from the DB instance while preserving the VPC-local route for application connectivity. The application-server subnets use separate route tables, so their NAT gateway routes and internet access remain unchanged.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!