Learn more about serverless with AWS and create a functional project that allow me save information about the exchange rate PEN / USD using AWS Lambda, DynamoDB, EventBridge and Serverless Framework.
- Create account on AWS
- Config credentials (https://www.serverless.com/framework/docs/providers/aws/guide/credentials/)
- Explore sites for extract exchange rates
- Serverless
- AWS DynamoDB
- AWS Lambda
- AWS EventBridge
- Node.js
- puppeteer
- chrome-aws-lambda
- puppeteer-extra-plugin-stealth
- uuid
- prettier
- eslint-config-prettier
Use yarn or npm for install dependencies.
yarn install
Then you should update the env.example.yml and change the name by env.yml. This file contains the sites from which we will extract the exchange rates.
Now we go to deploy our changes and create the infrastructure on AWS.
serverless deploy
You should go to Amazon EventBridge and create a rule for run the lambda function each certain time.
After that you could go to DynamoDB, select the table "rates" and you will see the extract data.
That's all!