amazon-web-servicesrequestoutboundinbound

AWS free instance(Ubuntu) inbound and outbound request


I'm new to AWS.

I have a django application with API, I deployed it in heroku(free instance), for accessing the api url from other external resource we need static IP address,i came to know that heroku IP is not static , it keep on changing dynamically, to get static IP in heroku there is an add-on called QuotaGuard Static , will provide inbound and outbound request for the API,

Like wise I want to know whether AWS free instance has static IP for inbound and outbound request for the API or not? Or like heroku we need to add any add-on for it. Can you guys please suggest me whether static IP is available for free instance in AWS or we need to go for paid service. Thanks in advance.


Solution

  • The public IPs are static and do not change over the life of an EC2 instance. However if you terminate an instance and spawn a new one then the public IP will change.

    To overcome this you can use elastic IP. Elastic IPs do not change (its like they are reserved for you) The cool thing about elastic IP is that they are charged if not attached to any instance, but the moment you attach them to an instance they are free.

    So if you use elastic IPs then you can use one static IP and it will not change even when you terminate the underlying EC2 instance and attach newly created EC2 instance