-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1750 from ministryofjustice/MLPAB-2818-keep-aws-l…
…ambda-rie-up-to-date MLPAB-2818 - update lambda runtime interface emulator
- Loading branch information
Showing
4 changed files
with
34 additions
and
28 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
docs/runbooks/update_lambda_runtime_interface_emulator_for_local_dev.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Using the Lambda Runtime Interface Emulator | ||
|
||
## Introduction | ||
|
||
The Lambda Runtime Interface Emulator (RIE) can be used to locally test a lambda image. | ||
|
||
These instructions are from [Deploy Go Lambda functions with container images](https://docs.aws.amazon.com/lambda/latest/dg/go-image.html) | ||
|
||
The RIE can be downloaded to you home directory with the following command. | ||
|
||
```shell | ||
mkdir -p ~/.aws-lambda-rie && \ | ||
curl -Lo ~/.aws-lambda-rie/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie && \ | ||
chmod +x ~/.aws-lambda-rie/aws-lambda-rie | ||
``` | ||
|
||
The arm64 emulator is at `https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie-arm64` | ||
|
||
## Using the Lambda RIE in a docker container | ||
|
||
You can run the container with the RIE by mounting in the volume. | ||
|
||
Note the following | ||
|
||
- docker-image is the image name and test is the tag. | ||
- /main is the ENTRYPOINT from your Dockerfile. | ||
|
||
```shell | ||
docker run --platform linux/amd64 -d -v ~/.aws-lambda-rie:/aws-lambda -p 9000:8080 \ | ||
--entrypoint /aws-lambda/aws-lambda-rie \ | ||
docker-image:test \ | ||
/main | ||
``` |