This is a demo project to experiment with dynamic task scheduling on AWS ECS. Technologies used:
Uses Alpha Vantage apis to fetch live crypto currencies exchange rates.
system diagram here..
- a new cryptocurrency to monitor is added as a new item in DynamoDB
- a lambda attached to the DynamoDB stream will spawn a new crypto-feed task on an ECS cluster
- the crypto-feed polls the Alpha Vantage api and emit live currency rate exchange events for that specific cryptocurrency
- an existing cryptocurrency item is removed from DynamoDB
- a lambda attached to the DynamoDB stream will remove the crypto-feed task from the ECS cluster
For now you can add/remove a cryptocurrency by creating/deleting an item on the dynamodb table.
TODO: expose this actions using http apis
aws dynamodb put-item --table-name crypto-exchange-feed-dev-cryptocurrency --item '{"Symbol": {"S": "BTC"}}'
aws dynamodb delete-item --table-name crypto-exchange-feed-dev-cryptocurrency --key '{"Symbol": {"S": "BTC"}}'