Skip to content

feat: update to Rust 1.56.1 #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2021
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.4.0-rust-1.56.1

* Upgrade to Rust [`1.56.1`](https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html)

# 0.4.0-rust-1.56.0

* Upgrade to Rust [`1.56.0`](https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM public.ecr.aws/lambda/provided:al2

ARG RUST_VERSION=1.56.0
ARG RUST_VERSION=1.56.1
RUN yum install -y jq openssl-devel gcc zip
RUN set -o pipefail && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| CARGO_HOME=/cargo RUSTUP_HOME=/rustup sh -s -- -y --profile minimal --default-toolchain $RUST_VERSION
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DOCKER ?= docker
INPUT_RELEASE_VERSION ?= 0.4.0
RUST_VERSION ?= 1.56.0
RUST_VERSION ?= 1.56.1
REPO ?= rustserverless/lambda-rust
TAG ?= latest

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

## 🤔 about

This docker image extends [lambda ci `provided.al2`](https://github.com/lambci/docker-lambda#documentation) builder docker image, a faithful reproduction of the actual AWS "**provided.al2**" Lambda runtime environment,
and installs [rustup](https://rustup.rs/) and the *stable* rust toolchain.
This docker image extends AWS Lambda `provided.al2 runtime environment, and installs [rustup](https://rustup.rs/) and the *stable* rust toolchain.

This provides a build environment, consistent with your target execution environment for predictable results.

Expand Down Expand Up @@ -108,7 +107,7 @@ output (not zipped) is available under `target/lambda/{profile}/output/{your-lam
You will see both `bootstrap` and `bootstrap.debug` files there.
> **⚠️ Note:** `PACKAGE=false` prevents `package` hook from running.

You can then invoke this bootstap executable with the lambda-ci docker image for the `provided.al2` AWS lambda runtime with a one off container.
You can then invoke this bootstap executable for the `provided.al2` AWS lambda runtime with a one off container.

```sh
# Build your function skipping the zip creation step
Expand All @@ -128,7 +127,7 @@ $ docker run \
-i -e DOCKER_LAMBDA_USE_STDIN=1 \
--rm \
-v ${PWD}/target/lambda/release/output/{your-binary-name}:/var/task:ro,delegated \
lambci/lambda:provided.al2
public.ecr.aws/lambda/provided:al2

# provide an event payload via stdin (typically a json blob)

Expand All @@ -148,7 +147,7 @@ $ unzip -o \
-v /tmp/lambda:/var/task:ro,delegated \
-e DOCKER_LAMBDA_STAY_OPEN=1 \
-p 9001:9001 \
lambci/lambda:provided.al2
public.ecr.aws/lambda/provided:al2
```

In a separate terminal, you can invoke your function with `curl`
Expand Down