HomeData scienceConstruct your first inventory analytics app that can price (virtually) zero to...

Construct your first inventory analytics app that can price (virtually) zero to keep up. | by Yury Prokashev | Feb, 2024


TrendWired Solutions
Free Keyword Rank Tracker
IGP [CPS] WW

This step-by-step information is for you if you wish to learn to construct your inventory analytics app utilizing AWS Serverless applied sciences.

The app will price you a few bucks a month for 1,000 Athena queries per day, as a result of we’ll use Lambda, S3, Glue, and Athena as an alternative of EC2 and MySQL.

I hope this app can turn out to be a basis on your additional experiments with inventory knowledge evaluation!

We are going to construct a easy inventory analytics app that may compute the each day returns of the Magnificent 7 shares and NASDAQ index knowledge for a given date and return utilizing a lambda perform URL within the browser:

The app will supply the inventory candle knowledge from Yahoo Finance and retailer it on S3.

We can even add the Glue desk so Athena can question the candle knowledge from S3.

Ultimately, additionally, you will have your candle database of seven shares and the NASDAQ index that can replace each day. It is possible for you to to play with candle knowledge utilizing Athena SQL within the Athena Question Editor within the AWS console.

We are going to use AWS CDK for all our infrastructure parts, so you’ll learn to outline these parts with CDK:

  1. Glue database and desk
  2. Lambda Layer and Lambda perform
  3. Athena Workgroup

We are going to implement the Python code that:

  1. Masses candle knowledge from Yahoo Finance utilizing yfinance Python library and shops it on S3 as a Parquet file.
  2. Queries candle knowledge utilizing boto3 Athena consumer and returns it with the lambda perform URL.

The complete mission IaC (Python CDK) and lambda code (Python) can be found in my public GitHub repo right here.

You’ll be able to merely test it out and deploy it to your AWS account by following the directions in README.md.

Beneath I’ll describe every little thing step-by-step, assuming nothing, so the article goes to be verbose.



Supply hyperlink

latest articles

WidsMob
Lilicloth WW

explore more