AWSEC2Handler
class provides an easy and asynchronous way to interact with Amazon EC2
services using the boto3
library. It allows you to securely connect to your AWS account using either provided credentials or environment
variables. Once connected, the handler can retrieve information about your EC2 instances, specifically those
that are in a running or stopped state. By leveraging asynchronous execution, it ensures that fetching data
from AWS does not block other operations in your application. This makes it a useful component for cloud-based
tools or systems that need to monitor or manage EC2 instances efficiently and in real-time.