Skip to content

Commit e19287e

Browse files
rimutakaVeetaha
authored andcommitted
Corrected --target name in README, added links. (awslabs#238)
1 parent c8dbcd3 commit e19287e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ jobs:
8282
- name: Generate Docs
8383
run: |
8484
cargo doc --no-deps
85-
echo "<meta http-equiv=refresh content=0;url=`lambda/index.html>" > target/doc/index.html
85+
echo "<meta http-equiv=refresh content=0;url=lambda/index.html>" > target/doc/index.html
8686
- name: Publish
8787
uses: peaceiris/actions-gh-pages@v3
8888
with:
8989
github_token: ${{ secrets.GITHUB_TOKEN }}
90-
publish_dir: ./target/doc
90+
publish_dir: ./target/doc

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,23 @@ The code above is the same as the [basic example](https://github.com/awslabs/aws
5353

5454
### Deployment
5555

56-
There are currently multiple ways of building this package: manually, and the [Serverless framework](https://serverless.com/framework/).
56+
There are currently multiple ways of building this package: manually, and with the [Serverless framework](https://serverless.com/framework/).
5757

5858
#### AWS CLI
5959

60-
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.
60+
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-unknown-linux-musl` platform.
6161

62+
Run this script once to add the new target:
6263
```bash
63-
$ cargo build -p lambda --example hello --release
64+
$ rustup target add x86_64-unknown-linux-musl
6465
```
6566

66-
For a custom runtime, AWS Lambda looks for an executable called `bootstrap` in the deployment package zip. Rename the generated `basic` executable to `bootstrap` and add it to a zip archive.
67+
Compile one of the examples as a _release_ with a specific _target_ for deployment to AWS:
68+
```bash
69+
$ cargo build -p lambda --example hello --release --target x86_64-unknown-linux-musl
70+
```
71+
72+
For [a custom runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html), AWS Lambda looks for an executable called `bootstrap` in the deployment package zip. Rename the generated `basic` executable to `bootstrap` and add it to a zip archive.
6773

6874
```bash
6975
$ cp ./target/release/examples/hello ./bootstrap && zip lambda.zip bootstrap && rm bootstrap

0 commit comments

Comments
 (0)