Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.88 KB

File metadata and controls

59 lines (40 loc) · 1.88 KB

AWS Rust Lambda POC

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.


Features

  • 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

References

Deploy with Cargo Lambda

Assumes AWS CLI is configured with credentials.

  1. (Optional) pick profile/region:

    export AWS_PROFILE=your-profile
  2. Build and deploy:

    cargo lambda build --release
    cargo lambda deploy rust-lambda-poc
  3. 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"}'

Next step – Blog 2 CDK + HTTP API

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 /health and S3-backed /items endpoints (GET/POST/DELETE).