This lamda function returns the SOL { balance : balance } OR { error : error } of a Solana account (not a token account), when it receives a GET request. E.G. endpoint/?address=xxxx
e.g. https://6iuvnc8op5.execute-api.us-east-1.amazonaws.com/production/check-balance?address=xxxx
Depending on your preferred package manager, follow the instructions below to deploy your project.
Requirements: NodeJS
lts/fermium (v.14.15.0)
. If you're using nvm, runnvm use
to ensure you're using the same Node version in local and in your lambda's runtime.
- Run
npm i
to install the project dependencies - Run
serverless deploy
to deploy this stack to AWS
- Run
yarn
to install the project dependencies - Run
serverless deploy
to deploy this stack to AWS
In order to test locally, run the following command: serverless offline start