Created
December 21, 2014 09:41
-
-
Save shamasis/6134c16d3ae0a914610f to your computer and use it in GitHub Desktop.
Create and allocate AWS Elastic IP at one go using AWS CLI. Replace `$1` with your Instance Id or simply execute this file as a script and pass the Instance Id as the first argument to the script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 associate-address --instance-id $1 --public-ip $(aws ec2 allocate-address --output text --query 'PublicIp') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment