Hello.
Just trying to auto-associate an IP to an elastic instance. What was done:
1. Configured to upload AWS private key and certificate to new instance.
2. In the startup script run the following command: ec2-associate-address -K /root/pk.pem -C /root/cert.pem -i $(curl -s http://169.254.169.254/latest/meta-data/instance-id) xx.xxx.xx.xxx
What's interesting is that this command works well from the terminal, but doesn't work on startup. I've also tried to invoke it from rc.local. Still no effect. Could you please suggest a workaround?