Skip to content

Commit 0a16f29

Browse files
committed
address pr copy feedback
1 parent aa5eb05 commit 0a16f29

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ fn my_handler(event: GreetingEvent, ctx: Context) -> Result<GreetingResponse, Ha
5555

5656
The code above is the same as the [basic example](https://github.com/awslabs/aws-lambda-rust-runtime/tree/master/lambda-runtime/examples/basic.rs) in the `lambda-runtime` crate.
5757

58-
### deployment
58+
### Deployment
5959

60-
#### aws cli
60+
There are currently multiple ways of building this package: manually, and the [Serverless framework](https://serverless.com/framework/).
6161

62-
To deploy the basic sample as a Lambda function using the aws cli, we first need to build it with `cargo`. Since Lambda uses Amazon Linux, you'll need to target your executable for an `x86_64-linux` platform.
62+
#### AWS CLI
63+
64+
To deploy the basic sample as a Lambda function using the [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html), we first need to manually build it with [`cargo`](https://doc.rust-lang.org/cargo/). Since Lambda uses Amazon Linux, you'll need to target your executable for an `x86_64-linux` platform.
6365

6466
```bash
6567
$ cargo build -p lambda_runtime --example basic --release
@@ -92,18 +94,21 @@ $ aws lambda invoke --function-name rustTest \
9294
$ cat output.json # Prints: {"message":"Hello, world!"}
9395
```
9496

95-
#### serverless framework
97+
#### Serverless Framework
98+
99+
Alternatively, you can build a Rust-based Lambda function declaratively using the [Serverless framework Rust plugin](https://github.com/softprops/serverless-rust).
96100

97-
You can optionally skip all of the manual building, renaming, and deploying steps above and use the [Serverless framework Rust plugin](https://github.com/softprops/serverless-rust). You can find an example
98-
getting started template application [here](https://github.com/softprops/serverless-aws-rust).
101+
A number of getting started Serverless application templates exist to get you up and running quickly
99102

100-
Serverless application templates exist for a minimal [echo function](https://github.com/softprops/serverless-aws-rust), [http function](https://github.com/softprops/serverless-aws-rust-http), and [multi function service](https://github.com/softprops/serverless-aws-rust-multi).
103+
* a minimal [echo function](https://github.com/softprops/serverless-aws-rust) to demonstrate what the smallest Rust function setup looks like
104+
* a minimal [http function](https://github.com/softprops/serverless-aws-rust-http) to demonstrate how to interface with API Gateway using Rust's native [http](https://crates.io/crates/http) crate (note this will a git dependency until 0.2 is published)
105+
* a combination [multi function service](https://github.com/softprops/serverless-aws-rust-multi) to demonstrate how to set up a services with multiple independent functions
101106

102-
To get started, just run the following commands to create a new lambda Rust application
107+
Assuming your host machine has a relatively recent version of node, you [won't need to install any host-wide serverless dependencies](https://blog.npmjs.org/post/162869356040/introducing-npx-an-npm-package-runner). To get started, run the following commands to create a new lambda Rust application
103108
and install project level dependencies.
104109

105110
```bash
106-
$ serverless install \
111+
$ npx serverless install \
107112
--url https://github.com/softprops/serverless-aws-rust \
108113
--name my-new-app \
109114
&& cd my-new-app \

0 commit comments

Comments
 (0)