I'm trying to find a way of listing/describing the public IP (doesn't have to be an EIP) of an EC2 instance. I've read about Describe* and I'm aware of the limitation of not being able to specify the resource in the policy.
So my question is:
While specifying the resource in the policy, is there any way for me to get the public IP of an EC2 instance? Is there any commands that can be used in awscli that would return the public IP while running under a user/group that would allow this action only within a specified resource?
I basically want to apply a policy that gives the user/group permission to get the IP only from a specified EC2 instance ID.
Thank you!