• Documentation
  • Pricing
© 2026 Serverless, Inc. All rights reserved.

Framework

  • Overview
  • Documentation
  • Plugins360
  • Pricing

Learn

  • Blog
  • GuidesUpdated
  • Examples240
  • Courses

Resources

  • Support
  • Security
  • Trust Center
  • Status

Community

  • Slack
  • GitHub47k
  • Forum
  • Meetups

Company

  • About
  • Careers
  • Contact
  • Partners

Legal

  • Terms of Service
  • Privacy Policy
  • Trademark
  • DMCA
Jonee Ryan Ty

AWS Serverless Boilerplate example in Rust

by

This example shows a Serverless boilerplate in Rust.

  1. AWS Serverless Boilerplate example in Rust

Serverless Boilerplate - AWS - Rust

Make sure serverless is installed. See installation guide.

You will also need to set up your AWS account credentials using environment variables or a configuration file. Please see the this guide for more information.

The function runs on the provided.al2023 (arm64) custom runtime, built with cargo-lambda.

1. Install cargo-lambda

cargo install cargo-lambda --locked

2. Build

cargo lambda build --release --arm64

or simply:

make build

This compiles the hello binary to target/lambda/hello/bootstrap and zips it to bin/hello.zip, the artifact referenced by serverless.yml.

3. Deploy

serverless deploy

or:

make deploy

4. Invoke deployed function

$ curl https://***.execute-api.us-east-1.amazonaws.com/test/test
{"message":"Serverless Rust Hello"}

Contents

  • Serverless Boilerplate - AWS - Rust
  • 1. Install cargo-lambda
  • 2. Build
  • 3. Deploy
  • 4. Invoke deployed function

Related

GuidesPluginsExamplesSlack CommunitySupport