When you deploy an ec2 instance it is assigned a public IP. Anytime you start or stop that instance there’s a chance that you could lose that IP. You get 5 elastic IP for your AWS account by default and this allows you to permanently assign a public IP to your instance. It is recommended that you simply use DNS and assign your randomly assigned IP to the DNS name. Elastic IP is incredibly useful if you have applications that cannot handle having a different IP