Origin
Origin

Reputation: 1417

Whitelisting ec2 instances in a VPC

I have a server A in which I am only allowing requests from a set of IP's which are whitelisted. I want to send requests from ec2 instances in a particular VPC to the server A. Currently, each time when I create a new instance in the VPC I whitelist the public IP so I can send the request. (or attach static IP and whitelist it). Is there any other way to handle this so that each time I don't have to whitelist it

Upvotes: 1

Views: 58

Answers (1)

Marcin
Marcin

Reputation: 238051

Usually you would place instances in a private subnet and use NAT gateway to connect to the internet. The reason is that NAT gateway has static public IP. Thus, all your instances would use that IP and you just need to whitelist the single IP, regardless of how many instances you have.

Upvotes: 3

Related Questions