From 64cd9d313685c786feed8706faa0b7f6ce311986 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Mon, 10 Dec 2018 20:48:37 -0700 Subject: [PATCH 1/2] Add note about `aws_lambda_events` crate As mentioned in https://github.com/awslabs/aws-lambda-rust-runtime/issues/12 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7ce9d0c3..3f37a81c 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,10 @@ pub type Handler = fn(E, Context) -> Result; Optionally, you can pass your own instance of Tokio runtime to the `lambda!()` macro. See our [`with_custom_runtime.rs` example](https://github.com/awslabs/aws-lambda-rust-runtime/tree/master/lambda-runtime/examples/with_custom_runtime.rs) +## AWS event objects + +This project does not currently include Lambda event struct defintions though we [intend to do so in the future](https://github.com/awslabs/aws-lambda-rust-runtime/issues/12). Instead, the community-maintained [aws_lambda_events](https://crates.io/crates/aws_lambda_events) crate can be leveraged to provide strongly-typed Lambda event structs. You can create your own custom event objects and their corresponding structs as well. + ## Custom event objects To serialize and deserialize events and responses, we suggest using the use the [`serde`](https://github.com/serde-rs/serde) library. To receive custom events, annotate your structure with Serde's macros: From 370c7184cac9dd9475479da9e9ca2f977e04fc07 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Mon, 10 Dec 2018 21:38:46 -0700 Subject: [PATCH 2/2] Use backticks for crate name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f37a81c..af3753fe 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Optionally, you can pass your own instance of Tokio runtime to the `lambda!()` m ## AWS event objects -This project does not currently include Lambda event struct defintions though we [intend to do so in the future](https://github.com/awslabs/aws-lambda-rust-runtime/issues/12). Instead, the community-maintained [aws_lambda_events](https://crates.io/crates/aws_lambda_events) crate can be leveraged to provide strongly-typed Lambda event structs. You can create your own custom event objects and their corresponding structs as well. +This project does not currently include Lambda event struct defintions though we [intend to do so in the future](https://github.com/awslabs/aws-lambda-rust-runtime/issues/12). Instead, the community-maintained [`aws_lambda_events`](https://crates.io/crates/aws_lambda_events) crate can be leveraged to provide strongly-typed Lambda event structs. You can create your own custom event objects and their corresponding structs as well. ## Custom event objects