Skip to content

Commit 39d6ec0

Browse files
committed
Bump README
1 parent a5bdc77 commit 39d6ec0

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

README.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,58 @@
11
# AWS Lambda Function URL Emulator
22

3-
This repository provides a lightweight Docker image to emulate **AWS Lambda Function URLs** locally. It uses **AWS Lambda Runtime Interface Emulator (RIE)** to replicate the behavior of Function URLs for local development and testing.
3+
A lightweight Docker image to emulate **AWS Lambda Function URLs** locally. It works with [AWS Lambda Runtime Interface Emulator (RIE)](https://github.com/aws/aws-lambda-runtime-interface-emulator/) to replicate the behavior of Function URLs for local development and testing.
44

55
## Features
66

77
- Emulates **AWS Lambda Function URLs** locally.
8-
- Automatically forwards HTTP requests to a locally running Lambda function using the AWS Lambda Runtime Interface Emulator.
8+
- Automatically forwards HTTP requests to a locally running Lambda function to work with the AWS Lambda Runtime Interface Emulator.
99
- Supports `APIGatewayProxyEventV2` for HTTP API requests.
1010
- Handles `isBase64Encoded` for binary data.
1111

1212
## Getting Started
1313

14-
### Pull the Docker Image
14+
### Run with Docker (Standalone)
1515

16-
```bash
17-
docker pull daido1976/aws-lambda-function-url-emulator:latest
18-
```
19-
20-
### Run the Emulator
16+
Please ensure that RIE is running in a separate container beforehand.
2117

2218
```bash
2319
docker run --rm -p 8080:8080 \
2420
-e RIE_ENDPOINT=http://host.docker.internal:9000/2015-03-31/functions/function/invocations \
2521
daido1976/aws-lambda-function-url-emulator:latest
2622
```
2723

28-
The emulator will be available at `http://localhost:8080`.
24+
The emulator will be available at `http://localhost:8080` and forwards requests to the RIE endpoint.
2925

30-
### Use Docker Compose to work with RIE
26+
### Run with Docker Compose
3127

3228
For a practical example of integrating this emulator with RIE using Docker Compose, refer to the [example](./example/) directory.
3329

34-
## Environment Variables
30+
### Run as a CLI Tool (Go)
3531

36-
| Variable | Description | Default Value |
37-
| -------------- | --------------------------------------------------- | ----------------------------------------------------------------- |
38-
| `RIE_ENDPOINT` | URL for the Lambda Runtime Interface Emulator (RIE) | `http://localhost:9000/2015-03-31/functions/function/invocations` |
32+
Install the emulator as a CLI tool:
3933

40-
## Build the Docker Image Locally
34+
```bash
35+
go install github.com/daido1976/aws-lambda-function-url-emulator@latest
36+
```
4137

42-
If you want to build the Docker image yourself:
38+
Run it with:
4339

4440
```bash
45-
docker build -t aws-lambda-function-url-emulator .
41+
aws-lambda-function-url-emulator
4642
```
4743

44+
The emulator will be available at `http://localhost:8080` and forwards requests to the default RIE endpoint. To use a custom endpoint, set the `RIE_ENDPOINT` environment variable:
45+
46+
```bash
47+
RIE_ENDPOINT=http://custom-host:9000/2015-03-31/functions/function/invocations aws-lambda-function-url-emulator
48+
```
49+
50+
## Environment Variables
51+
52+
| Variable | Description | Default Value |
53+
| -------------- | --------------------------------------------------- | ----------------------------------------------------------------- |
54+
| `RIE_ENDPOINT` | URL for the Lambda Runtime Interface Emulator (RIE) | `http://localhost:9000/2015-03-31/functions/function/invocations` |
55+
4856
## License
4957

5058
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.

0 commit comments

Comments
 (0)