Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ information to effectively respond to your bug report or contribution.

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/awslabs/aws-lambda-rust-runtime/issues), or [recently closed](https://github.com/awslabs/aws-lambda-rust-runtime/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
When filing an issue, please check [existing open](https://github.com/aws/aws-lambda-rust-runtime/issues), or [recently closed](https://github.com/aws/aws-lambda-rust-runtime/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
Expand Down Expand Up @@ -40,7 +40,7 @@ GitHub provides additional document on [forking a repository](https://help.githu

## Finding contributions to work on

Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/aws-lambda-rust-runtime/labels/help%20wanted) issues is a great place to start.
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws/aws-lambda-rust-runtime/labels/help%20wanted) issues is a great place to start.

## Code of Conduct

Expand All @@ -54,6 +54,6 @@ If you discover a potential security issue in this project we ask that you notif

## Licensing

See the [LICENSE](https://github.com/awslabs/aws-lambda-rust-runtime/blob/main/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
See the [LICENSE](https://github.com/aws/aws-lambda-rust-runtime/blob/main/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Rust Runtime for AWS Lambda

[![Build Status](https://github.com/awslabs/aws-lambda-rust-runtime/actions/workflows/check-examples.yml/badge.svg)](https://github.com/awslabs/aws-lambda-rust-runtime/actions)
[![Build Status](https://github.com/aws/aws-lambda-rust-runtime/actions/workflows/check-examples.yml/badge.svg)](https://github.com/aws/aws-lambda-rust-runtime/actions)

This package makes it easy to run AWS Lambda Functions written in Rust. This workspace includes multiple crates:

Expand All @@ -10,8 +10,6 @@ This package makes it easy to run AWS Lambda Functions written in Rust. This wor
- [![Docs](https://docs.rs/aws_lambda_events/badge.svg)](https://docs.rs/aws_lambda_events) **`lambda-events`** is a library with strongly-typed Lambda event structs in Rust.
- [![Docs](https://docs.rs/lambda_runtime_api_client/badge.svg)](https://docs.rs/lambda_runtime_api_client) **`lambda-runtime-api-client`** is a shared library between the lambda runtime and lambda extension libraries that includes a common API client to talk with the AWS Lambda Runtime API.

The Rust runtime client is an experimental package. It is subject to change and intended only for evaluation purposes.

## Getting started

The easiest way to start writing Lambda functions with Rust is by using [Cargo Lambda](https://www.cargo-lambda.info/), a related project. Cargo Lambda is a Cargo plugin, or subcommand, that provides several commands to help you in your journey with Rust on AWS Lambda.
Expand Down Expand Up @@ -113,7 +111,7 @@ async fn handler(_event: LambdaEvent<()>) -> Result<(), ErrorResponse> {
}
```

We recommend you to use the [thiserror crate](https://crates.io/crates/thiserror) to declare your errors. You can see an example on how to integrate `thiserror` with the Runtime's diagnostics in our [example repository](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/examples/basic-error-thiserror)
We recommend you to use the [thiserror crate](https://crates.io/crates/thiserror) to declare your errors. You can see an example on how to integrate `thiserror` with the Runtime's diagnostics in our [example repository](https://github.com/aws/aws-lambda-rust-runtime/tree/main/examples/basic-error-thiserror)

### Anyhow, Eyre, and Miette

Expand All @@ -129,7 +127,7 @@ async fn handler(_event: LambdaEvent<Request>) -> Result<(), Diagnostic> {
}
```

You can see more examples on how to use these error crates in our [example repository](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/examples/basic-error-error-crates-integration).
You can see more examples on how to use these error crates in our [example repository](https://github.com/aws/aws-lambda-rust-runtime/tree/main/examples/basic-error-error-crates-integration).

### Graceful shutdown

Expand Down Expand Up @@ -370,7 +368,7 @@ Now you can use the `cargo lambda invoke` to send requests to your function. For
cargo lambda invoke <lambda-function-name> --data-ascii '{ "command": "hi" }'
```

Running the command on a HTTP function (Function URL, API Gateway, etc) will require you to use the appropriate scheme. You can find examples of these schemes [here](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/lambda-http/tests/data). Otherwise, you will be presented with the following error.
Running the command on a HTTP function (Function URL, API Gateway, etc) will require you to use the appropriate scheme. You can find examples of these schemes [here](https://github.com/aws/aws-lambda-rust-runtime/tree/main/lambda-http/tests/data). Otherwise, you will be presented with the following error.

```rust,no_run
Error: serde_json::error::Error
Expand Down
2 changes: 1 addition & 1 deletion examples/basic-error-handling/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// See <https://github.com/awslabs/aws-lambda-rust-runtime> for more info on Rust runtime for AWS Lambda
/// See <https://github.com/aws/aws-lambda-rust-runtime> for more info on Rust runtime for AWS Lambda
use lambda_runtime::{service_fn, tracing, Error, LambdaEvent};
use serde::{Deserialize, Serialize};
use serde_json::json;
Expand Down
2 changes: 1 addition & 1 deletion examples/http-basic-lambda/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use lambda_http::{run, service_fn, tracing, Body, Error, Request, Response};
/// This is the main body for the function.
/// Write your code inside it.
/// There are some code examples in the Runtime repository:
/// - <https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/examples>
/// - <https://github.com/aws/aws-lambda-rust-runtime/tree/main/examples>
async fn function_handler(_event: Request) -> Result<Response<Body>, Error> {
// Extract some useful information from the request

Expand Down
2 changes: 1 addition & 1 deletion examples/http-dynamodb/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct Item {
/// This is the main body for the function.
/// Write your code inside it.
/// You can see more examples in Runtime's repository:
/// - <https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/examples>
/// - <https://github.com/aws/aws-lambda-rust-runtime/tree/main/examples>
async fn handle_request(db_client: &Client, event: Request) -> Result<Response<Body>, Error> {
// Extract some useful information from the request
let body = event.body();
Expand Down
2 changes: 1 addition & 1 deletion examples/http-query-parameters/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use lambda_http::{run, service_fn, tracing, Error, IntoResponse, Request, Reques
/// This is the main body for the function.
/// Write your code inside it.
/// You can see more examples in Runtime's repository:
/// - <https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/examples>
/// - <https://github.com/aws/aws-lambda-rust-runtime/tree/main/examples>
async fn function_handler(event: Request) -> Result<impl IntoResponse, Error> {
// Extract some useful information from the request
Ok(
Expand Down
2 changes: 1 addition & 1 deletion lambda-events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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](https://github.com/awslabs/aws-lambda-rust-runtime).
defined in this crate are usually used with handlers / runtimes provided by the [official Rust runtime](https://github.com/aws/aws-lambda-rust-runtime).

For a list of supported AWS Lambda events and services, see [the crate reference documentation](https://docs.rs/aws_lambda_events).

Expand Down
2 changes: 1 addition & 1 deletion lambda-http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub fn custom_authorizer_response(effect: &str, principal: &str, method_arn: &st
ApiGatewayCustomAuthorizerResponse {
principal_id: Some(principal.to_owned()),
policy_document: policy,
context: json!({ "email": principal }), // https://github.com/awslabs/aws-lambda-rust-runtime/discussions/548
context: json!({ "email": principal }), // https://github.com/aws/aws-lambda-rust-runtime/discussions/548
usage_identifier_key: None,
}
}
Expand Down
Loading