'Check for Publicly accessible AWS Resources using boto3

How can we check that a particular service in AWS can be accessible from Public using command line tools or boto3 library.

The main requirement is to check whether a particular services have poor configuration so that the service can be reached over internet.

An example instance would be an AWS ECS instance which has its service which is publicly exposed by checking the configuration.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source