You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-21
Original file line number
Diff line number
Diff line change
@@ -26,26 +26,26 @@ Instructions for installing AWS Lambda Runtime Interface Emulator for your platf
26
26
27
27
## Getting started
28
28
29
-
There are a few ways you use the Runtime Interface Emulator (RIE) to locally test your function depending on the base image used.
29
+
There are a few ways you use the Runtime Interface Emulator (RIE) to locally test your function depending on the base image used.
30
30
31
31
32
32
### Test an image with RIE included in the image
33
33
34
-
The AWS base images for Lambda include the runtime interface emulator. You can also follow these steps if you built the RIE into your alternative base image.
34
+
The AWS base images for Lambda include the runtime interface emulator. You can also follow these steps if you built the RIE into your alternative base image.
35
35
36
36
#### To test your Lambda function with the emulator
37
37
38
-
1. Build your image locally using the docker build command.
38
+
1. Build your image locally using the docker build command.
39
39
40
40
`docker build -t myfunction:latest .`
41
41
42
-
2. Run your container image locally using the docker run command.
42
+
2. Run your container image locally using the docker run command.
43
43
44
44
`docker run -p 9000:8080 myfunction:latest`
45
45
46
-
This command runs the image as a container and starts up an endpoint locally at `localhost:9000/2015-03-31/functions/function/invocations`.
46
+
This command runs the image as a container and starts up an endpoint locally at `localhost:9000/2015-03-31/functions/function/invocations`.
47
47
48
-
3. Post an event to the following endpoint using a curl command:
48
+
3. Post an event to the following endpoint using a curl command:
@@ -71,7 +71,7 @@ The following example shows a typical script for a Node.js function.
71
71
fi
72
72
```
73
73
74
-
2. Download the [runtime interface emulator](https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest) for your target architecture (`aws-lambda-rie` for x86\_64 or `aws-lambda-rie-arm64` for arm64) from GitHub into your project directory.
74
+
2. Download the [runtime interface emulator](https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest) for your target architecture (`aws-lambda-rie` for x86\_64 or `aws-lambda-rie-arm64` for arm64) from GitHub into your project directory.
75
75
76
76
3. Install the emulator package and change `ENTRYPOINT` to run the new script by adding the following lines to your Dockerfile:
77
77
@@ -108,30 +108,30 @@ You install the runtime interface emulator to your local machine. When you run t
This command invokes the function running in the container image and returns a response.
131
131
132
-
## How to configure
132
+
## How to configure
133
133
134
-
`aws-lambda-rie` can be configured through Environment Variables within the local running Image.
134
+
`aws-lambda-rie` can be configured through Environment Variables within the local running Image.
135
135
You can configure your credentials by setting:
136
136
* `AWS_ACCESS_KEY_ID`
137
137
* `AWS_SECRET_ACCESS_KEY`
@@ -147,17 +147,17 @@ The rest of these Environment Variables can be set to match AWS Lambda's environ
147
147
148
148
## Level of support
149
149
150
-
You can use the emulator to test if your function code is compatible with the Lambda environment, executes successfully
151
-
and provides the expected output. For example, you can mock test events from different event sources. You can also use
152
-
it to test extensions and agents built into the container image against the Lambda Extensions API. This component
153
-
does *not *emulate* *the orchestration behavior of AWS Lambda. For example, Lambda has a network and security
154
-
configurations that will not be emulated by this component.
150
+
You can use the emulator to test if your function code is compatible with the Lambda environment, executes successfully
151
+
and provides the expected output. For example, you can mock test events from different event sources. You can also use
152
+
it to test extensions and agents built into the container image against the Lambda Extensions API. This component
153
+
does *not *emulate* *the orchestration behavior of AWS Lambda. For example, Lambda has a network and security
154
+
configurations that will not be emulated by this component.
155
155
156
156
157
157
* You can use the emulator to test if your function code is compatible with the Lambda environment, runs successfully and provides the expected output.
158
158
* You can also use it to test extensions and agents built into the container image against the Lambda Extensions API.
159
-
* This component does _not_ emulate Lambda’s orchestration, or security and authentication configurations.
160
-
* The component does _not_ support X-ray and other Lambda integrations locally.
159
+
* This component does _not_ emulate Lambda’s orchestration, or security and authentication configurations.
160
+
* The component does _not_ support X-ray and other Lambda integrations locally.
161
161
* The component supports only Linux, for x86-64 and arm64 architectures.
0 commit comments