I have configured PuTTY for accessing my instances as described in the instruction. I have set the hostname as it's displayed in my instance dashboard - everything works great. But when I restart my instance, it's public IP address (as well as public DNS) is different (AFAIU they are being rearranged each time the instance restarts). So I have to reconfigure my connection in PuTTY. Is there any way to get some constant configuration that will work regardless changing IP address?
P.S.: I know that Elastic IP's are the solution, but I'm interested in some other options.
Package your app inside Docker container and re-start docker container inside host machine if needed. There is Docker support in Elastic Beanstalk service, so you don't have to worry about installing and configuring Docker. So typical flow for working directly with service is
However, there is some non-obvious feature using Beanstalk as by default your app will be exposed to external world on 80 port using pre-installed nginx and you have to reconfigure nginx a bit if you don't want to expose 80 port. But actually you will achieve a full power of deploy automation available with Beanstalk.
I see no reason why not to use Elastic IP - it is free and easy to setup.
Another option would be using dynamic DNS but you will need to be able to execute a some sort of a script upon instance startup (internally or externally). We used setup like this in the past for our internal addresses but eventually migrated to VPC. DNSMadeEasy supports this feature, there are plenty of scripts available and it is easy to write your own.