0

Is it possible to get a public IP address on an EC2 instance such that this public IP address is assigned to the interface in the VM and shows in ifconfig?

Ie no NAT, just direct Internet connectivity.

If so, how is this configured?

Thanks

2 Answers2

1

No it's not possible to see it in ifconfig. You will need to check the instance metadata to get the public IP.

Mark B
  • 183,023
  • 24
  • 297
  • 295
1

You can not see it in ifconfig, you need to use meta-data

$ curl http://169.254.169.254/latest/meta-data/   

AWS Instance IP

Cenxui
  • 1,343
  • 1
  • 17
  • 25