A python service to push the count of running EC2 instances in a list of regions periodically to a webhook in a Docker container.
This application is written with Python 3.6.
Create a file named '.env' on the root folder with following Key-Value pairs:
aws_access_key_id=XXXXXXX
aws_secret_access_key=XXXXXXX
aws_region_name=XXXXXX
webhook_url=https://webhook.site/xyz
periodic_time_interval=30 (time in minutes)
It is best to first install Docker on the system. Then run the following commands:
# To build docker image.
docker build -t data_pump_service .
# To run docker container.
docker run --env-file=.env -t data_pump_service