Skip to content

Commit 0f01ee8

Browse files
committed
flush our readme
1 parent eef5ec8 commit 0f01ee8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,29 @@ $ docker run --rm \
3333
softprops/lambda-rust:{tag}
3434
```
3535

36+
## Local Testing
37+
38+
Once you've build a Rust lambda function artifact the `provided` runtime expects
39+
deployments of that artifact to be named **bootstrap**
40+
41+
```sh
42+
$ mv target/lambda/release/{your-crate-name} target/lambda/release/bootstap
43+
```
44+
45+
You can then invoke this bootstap executable with the lambda-ci provided docker image
46+
47+
48+
```sh
49+
# start a docker container replicating the "provided" lambda runtime
50+
# awaiting an event to be provided via stdin
51+
$ docker run \
52+
-i -e DOCKER_LAMBDA_USE_STDIN=1 \
53+
--rm \
54+
-v \
55+
"$PWD/target/lambda/release":/var/task \
56+
lambci/lambda:provided
57+
58+
# provide payload via stdin (typically a json blob)
59+
60+
# Ctrl-D to yield control back to your function
61+
```

0 commit comments

Comments
 (0)