how to set same IP for multiple instances when using outgoing restful request?

0

Hi, I am trying to use 3rd party services with my EC2 instances. The 3rd party service has some security rules. one of them is that my instance's IP has to be whitelisted.

I am working with multiple instances that can be scaled over time and I don't want to set Elastic IP for each instance. and I don't want to register new IP every time I'm adding a new instance.

Is there a way to use a service (maybe proxy) that listen to all my instances and forward the outgoing request with the same IP?

I also believe it is more secure to put my outgoing requests behind a proxy.

Can I get an explanation/tutorial for doing that?

Thank you! Asaf

1 Antwort
1

This is presented as a use case for a NAT Gateway.

When you create a public NAT Gateway you associate it with an elastic IP which the IP address that outside services would see when it is used by your servers:

The NAT gateway replaces the source IP address of the instances with the IP address of the NAT gateway. For a public NAT gateway, this is the elastic IP address of the NAT gateway.

beantwortet vor einem Jahr
EXPERTE
überprüft vor einem Jahr
  • Exactly, assuming the EC2 instances don't need to be public and accepting inbound requestd from the internet - a reasonable assumption given it's a scaled fleet.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen