0

I accidentally enabled firewall in my Ec2 instance which blocked me from SSHing --> Then, I used this answer to https://stackoverflow.com/a/50999373/3705478 gain access to my Ec2 instance, but my public Ip address changed. --> This caused me to update my Ip address with Domain registrar as it is a web server facing public. Also I have to change the ip address of the DB running Ec2 instances.

How can I prevent my public Ip address changing under such situations in Amazon EC2?

sofs1
  • 3,834
  • 11
  • 51
  • 89

1 Answers1

1

See the aws documentation for allocating a static ip here https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-allocating

jamesfranco
  • 500
  • 4
  • 13