2 Answers
- Newest
- Most votes
- Most comments
1
Hello. Please see if this helps. 'MapPublicIpOnLaunch' in the Response when describe_subnets() is called.
MapPublicIpOnLaunch has a true/false value and indicates whether instances launched in this subnet receive a public IPv4 address.
answered a year ago
0
Hi, there is not a direct command that returns if your subnet is either private or public. You can use for instance the describe_subnets and get the subnet-id that the network firewall is using and the subnet-id that your instances are using and compare them. Another option can be: create a tag in your subnets where you identify subnets as private or public, and then with the same describe_subnets you can get tags and then know if these are private or public.
answered a year ago
Relevant content
- Accepted Answerasked 10 months ago
- Accepted Answerasked 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago