get the ENIs and resolves them to IPs in CloudFormation

331 views Asked by At

Does anybody know how to create a custom resource that takes the ENIs (!GetAtt AGWEndpoint.NetworkInterfaceIds) and resolves them to IPs.

I want to get the IP address of a VPC Endpoint of an API gateway. I want to get this IP address and put it in the output part of the cloudformation template. Like you can see in this example, I can get the DNS (with NetworkInterfaceIds), but I want the IP address.

Outputs: 
 PublicIp: 
  Description: EC2Ip 
  Value: !GetAtt [Ec2Instance,PublicIp] 
IpTest: 
 Description: AgwIp 
 Value: !Join 
  - ',' 
  - !GetAtt AGWEndpoint.NetworkInterfaceIds
0

There are 0 answers