I've got elastic IP switching set up on my AWS Linux box. I know the shell commands to switch IP addresses. But I don't know how to do this in Ruby.
Here's the shell commands...
-
Get Instance ID:
wget -O - 'http://ift.tt/1IpSH7i' 2>/dev/null
-
Allocate an elastic IP:
aws ec2 allocate-address
-
Associate elastic IP with this instance. Use instance and allocation IDs returned from steps 1 and 2.
aws ec2 associate-address --instance-id INSTANCE_ID_HERE --allocation-id ALLOCATION_ID_HERE
How do I do these with Ruby's aws-sdk
gem?
Aucun commentaire:
Enregistrer un commentaire