/serverless-cryptocurrency-price-monitor

The idea of this project is to build a cryptocurrency monitor using Serverless Framework, AWS Lambda, DynamoDB and SES.

Primary LanguageJavaScript

Serverless Cryptocurrency Price Monitor

Index

About

This app was built to monitor a cryptocurrency price and send a notification if the price had an oscillation. To create this solution, I used Serverless Framework, AWS Lambda, DynamoDB and SES. To avoid unnecessary charges on AWS, I chose use the Localstack to simulate AWS environment offline.

Diagram

Alt text

Usage

To run on development:

To install all packages use the command:

yarn install

To simulate AWS enviromennt offline using localstack:

docker compose up -d

To create the dynamoDb tables:

bash ./scripts/create-db-table.sh

To invoke functions locally:

yarn invoke:getPrice
yarn invoke:sendNotification

To run on Serverless Framework:

  • Configure AWS envinments:

    • AWS config file:
      [default]
      region=us-east-1
      output=json
      
    • AWS credentials file:
      [default]
      aws_access_key_id=<YOUR_AWS_ACCESS_KEY>
      aws_secret_access_key=<YOUR_AWS_SECRET_ACCESS_KEY>
      
      

To deploy functions:

sls deploy

Technologies