Five O'Clock Somewhere Twitter Bot
Contents
This is my first “app” hosted on an AWS ECS Cluster. It is a simple application that runs every hour, finds a region where it is currently 5PM, and posts to a Twitter account (@5OCSomewhere).
Tools Used
-
AWS ECS
-
Docker
-
GitHub Actions (to auto run unit tests, build into docker image, upload image to AWS ECR and deploy to a ECS task definition with a cron schedule)
-
Python 3.8
-
Google Cloud (specifically the maps API to find the country and geolocation of a timezone)
-
Twitter developer API (implemented using the python module Tweepy)
-
emoji-country-flag python module
Main Learnings
-
General use of ECS and the instances it creates
-
Any ECS task definition should have a
bridge
network mode in order to connect to external IPs (not anawsvpc
network mode)