amazon web services - AWS CDK: A method to get Elastic IPs associated with a Public Subnet - Stack Overflow

I need to get the Elastic IP that is associated with a Public Subnet (map_public_ip_on_launch=True).I

I need to get the Elastic IP that is associated with a Public Subnet (map_public_ip_on_launch=True).

I tried the following solutions: 1 2 (see printEIP())

However, looks like there's no public subnet's node children. The following code will produce [] as output:

for subnet in vpc.public_subnets:
  print(node.children)

The question is - is there a way to get the Elastic IP associated with a Public Subnet in AWS CDK? In the web interface, at the "Elastic IP addresses" page I see the associations with the subnets.

Similar SO answers (How to list the Elastic IP (EIP) addresses via CDK, Get EIP as output from aws-cdk generated VPC definition) do not appear to be working anymore.

Thank you

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744825612a4595776.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信