Member-only story
Stock Data Puller on AWS ECS
In this post, I will share my journey of diving deep into building/deployment of Containers (Docker, Kubernetes, AWS Elastic Container Service, AWS Elastic Kubernetes Service). You can follow the steps to implement the solution with me in your own AWS account.
I will walk you through the steps to run a very simple python code using Docker, AWS Elastic Container Service (AWS ECS) and AWS Elastic Container Registry (AWS ECR).
In the next parts, I will walk through adding new features to the application, CI/CD, EKS etc.
Pre-Requisites:
- Hands-on experience of AWS
- Conceptual Knowledge of Containters and Docker
- High-level Knowledge of AWS ECS and AWS EKS services
Code:
I wrote the following simple code that accepts the stock ticker (for e.g. AMZN, NVDA etc.) and year-month in the format yyyy–MM (for e.g. 2020–01) through a file on S3. The code returns the stock data for that month at 1 minute interval.
The code uses stock data APIs from alphavantage. Get a free API key from their website. More details here — API Key and Documentation.
In this sample S3 input file, each row determines the stock ticker and the year-month information.