amazon web services - Aws public ip in runing instance -
when ifconfig in ec2 instance private ip. adding sites-available in apache need public ip.
is there way can public ip in running instance.
there "magic ip" on amazon ec2 instaces can curl metadata instance.
to public ip of current instance can do:
curl http://169.254.169.254/latest/meta-data/public-ipv4
you can read full documentation here.
Comments
Post a Comment