A sample serverless app with Rust. I'm just experimenting stuff here so don't take anything at face value π.
Current features:
- β Synchronous lambdas
- β Asynchronous lambdas
- β IAC unit tests
- π Lambda unit tests
- β Integration tests
- β Preview environments
- β Frontend
A very simple todo API to create, retrieve and delete todos. No front for now.
This is the architecture schema:
NodeJS: See official NodeJS install docs. The current NodeJS version is stored in .nvmrc
. If you use nvm
, you can run:
nvm use
Pnpm: dependency manager. Install with:
npm install -g pnpm
Rust toolchain: the Rust version is pinned in rust-toolchain.toml
. Follow the official install instructions.
Cargo Lambda: in order to cross-compile Rust code to Lambda runtime. Follow install instructions.
Install NodeJS dependencies:
pnpm install
In order to deploy, you will need an AWS account. If you don't have one, refer to the AWS documentation.
Then install the AWS CLI: install docs.
Setup a local profile:
aws configure --profile <your-profile-name>
pnpm build
pnpm test
β Warning: you may have to log in to your AWS profile again, depending on the setup method.
pnpm run deploy --profile <your-profile-name>
pnpm test-integration