In aws.amazon in the instance control panel, you can change your elastic (public) IP and connect it to your instance.
How can you implement it programmatically?
Linux Ubuntu system
command line tools: http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ami-tools.html
get a new ip - http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-AllocateAddress.html
bind IP to the server - http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-AssociateAddress.html
unbind from server - http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-DisassociateAddress.html
free address - http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-ReleaseAddress.html
Source: https://ru.stackoverflow.com/questions/455447/
All Articles