I wrote a cloud formation template to create an Auto Scaling group with size as 1. Now I want to assign an elastic IP to this instance via cloud formation.
Unfortunately, AWS::AutoScaling::AutoScalingGroup doesn't have any Fn::GetAtt to get the instance-id attached to this auto scaling group.
Is there any other way to get the instance-id for this instance? Or can we directly get instance-id of an existing EC2 instance from its Name tag in cloud formation?
Userdata script is not acceptable, as it requires AWS IAM credentials.