40 releases (14 breaking)

0.15.0 Feb 26, 2024
0.13.1 Jan 23, 2024
0.13.0 Dec 20, 2023
0.12.1 Nov 14, 2023
0.1.0 Oct 30, 2018

#52 in Web programming

Download history 13235/week @ 2023-12-23 20049/week @ 2023-12-30 25832/week @ 2024-01-06 24847/week @ 2024-01-13 31558/week @ 2024-01-20 32604/week @ 2024-01-27 28657/week @ 2024-02-03 36075/week @ 2024-02-10 32013/week @ 2024-02-17 33830/week @ 2024-02-24 34971/week @ 2024-03-02 38369/week @ 2024-03-09 36516/week @ 2024-03-16 33788/week @ 2024-03-23 36465/week @ 2024-03-30 29245/week @ 2024-04-06

143,201 downloads per month
Used in 43 crates (23 directly)

MIT license

365KB
8K SLoC

AWS Lambda Events

crates.io Documentation

This crate provides strongly-typed AWS Lambda event structs in Rust.

Installation

Add the dependency with Cargo: cargo add aws_lambda_events.

Usage

The crate itself has no AWS Lambda handler logic and instead exists to serialize and deserialize AWS Lambda events into strongly-typed Rust structs.

The types defined in this crate are usually used with handlers / runtimes provided by the official Rust runtime.

For a list of supported AWS Lambda events and services, see the crate reference documentation.

Conditional compilation of features

This crate divides all Lambda Events into features named after the service that the events are generated from. By default all events are enabled when you include this crate as a dependency to your project. If you only want to import specific events from this crate, you can disable the default features, and enable only the events that you need. This will make your project to compile a little bit faster, since rustc doesn't need to compile events that you're not going to use. Here's an example on how to do that:

cargo add aws_lambda_events --no-default-features --features apigw,alb

History

The AWS Lambda Events crate was created by Christian Legnitto. Without all his work and dedication, this project could have not been possible.

In 2023, the AWS Lambda Event crate was moved into this repository to continue its support for all AWS customers that use Rust on AWS Lambda.

Dependencies

~0.9–9MB
~53K SLoC