File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -36,24 +36,23 @@ $ docker run --rm \
36
36
## Local Testing
37
37
38
38
Once you've build a Rust lambda function artifact the ` provided ` runtime expects
39
- deployments of that artifact to be named ** bootstrap**
39
+ deployments of that artifact to be named ** bootstrap** . The lambda-rust docker image
40
+ builds a zip file containing your binary files renamed to bootstrap
40
41
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
42
+ You can invoke this bootstap executable with the lambda-ci provided docker image
46
43
47
44
48
45
``` sh
49
46
# start a docker container replicating the "provided" lambda runtime
50
47
# 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
48
+ $ unzip \
49
+ target/lambda/release/{your-binary-name}.zip \
50
+ -d /tmp/lambda && \
51
+ docker run \
52
+ -i -e DOCKER_LAMBDA_USE_STDIN=1 \
53
+ --rm \
54
+ -v /tmp/lambda:/var/task \
55
+ lambci/lambda:provided
57
56
58
57
# provide payload via stdin (typically a json blob)
59
58
Original file line number Diff line number Diff line change @@ -19,5 +19,11 @@ cd "$CARGO_TARGET_DIR"/release
19
19
find -maxdepth 1 -executable -type f
20
20
) ; do
21
21
strip " $file "
22
+ rm " $file .zip" > 2& > /dev/null
23
+ # note: would use printf "@ $(basename $file)\n@=bootstrap" | zipnote -w "$file.zip"
24
+ # if not for https://bugs.launchpad.net/ubuntu/+source/zip/+bug/519611
25
+ mv " $file " bootstrap
26
+ zip " $file .zip" bootstrap
27
+ rm bootstrap
22
28
done
23
29
) 1>&2
You can’t perform that action at this time.
0 commit comments