A simple proof-of-concept using Rust, AWS Lambda, and the AWS SDK for Rust.
Beginner-friendly. Uses a basic Lambda function that lists your S3 buckets.
This repo is a small POC for starting to learn Rust and AWS Lambda, inspired by the recent support for the AWS SDK for Rust.
- AWS Lambda function written in Rust
- Uses AWS SDK for Rust
- Demonstrates listing S3 buckets
- Very small Lambda binary (2β4 MB)
- Extremely fast cold starts
- AWS Lambda with Rust
- AWS SDK for Rust β Developer Guide
- Building serverless applications with Rust on AWS Lambda
- The Rust Programming Language
Assumes AWS CLI is configured with credentials.
-
(Optional) pick profile/region:
export AWS_PROFILE=your-profile -
Build and deploy:
cargo lambda build --release cargo lambda deploy rust-lambda-poc
-
Invoke to test (remote Lambda):
# hello example cargo lambda invoke rust-lambda-poc --remote \ --data-ascii '{"path":"/items","id":123}' # simple health check cargo lambda invoke rust-lambda-poc --remote \ --data-ascii '{"path":"/health","command":"health"}'
Once you're comfortable with this single-function Lambda deployed via Cargo Lambda, the next repo in the series is rust-lambda-cdk-s3-poc, which:
- Uses AWS CDK to deploy a Rust Lambda behind HTTP API Gateway.
- Adds
/healthand S3-backed/itemsendpoints (GET/POST/DELETE).