Skip to content

Demo project implementing an AWS Lambda function in Rust with Axum and deploying with Pulumi IaC

License

Notifications You must be signed in to change notification settings

alexgladd/rust-lambda-pulumi

Repository files navigation

Rust / Lambda / Pulumi

rust-lambda-pulumi is a Rust project that implements an AWS Lambda function in Rust using the Axum web application framework. It uses Pulumi IaC to automate deployment to AWS.

Prerequisites

Building

Run pnpm build to build the project.

This will use Cargo Lambda to build a Lambda-compatible bootstrap binary and package it into a ZIP file that's ready for deployment.

Deploying

Run pnpm run deploy to deploy the project to AWS.

You'll need to have AWS credentials set up. This will use Pulumi to create a Lambda function using the built Rust binary and link it to an API Gateway. Pulumi will output the API Gateway's public endpoint once everything is deployed.

Don't worry, you can run pnpm run destroy to tear down all of the deployed resources!

Testing

Once deployed, hit the root path on the API Gateway's public endpoint to get a list of available paths (or just cheat and check out the source!).

About

Demo project implementing an AWS Lambda function in Rust with Axum and deploying with Pulumi IaC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published