Skip to content

Commit 500d5fa

Browse files
committed
README usage updates
Fix startup messaging not including all endpoints
1 parent b38f04a commit 500d5fa

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

Diff for: README.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AWS Lambda Runtime API for local testing of custom runtimes
33

44
This project runs an HTTP API that is intended to emulate the [AWS Lambda Runtime Interface](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html) to enable local testing of custom runtimes.
55

6-
## Usage
6+
## Running
77

88
This utility is published as both a jar or Docker image.
99

@@ -34,4 +34,24 @@ Run on alternate port
3434

3535
```bash
3636
docker run -p 8080:8080 -e RUNTIME_PORT=8080 c1phr/aws-lambda-runtime-local
37-
```
37+
```
38+
39+
## Usage
40+
41+
This utility will expose endpoints that mirror the AWS Lambda Runtime interface:
42+
43+
```text
44+
GET http://localhost:9000/2018-06-01/runtime/invocation/next
45+
POST http://localhost:9000/2018-06-01/runtime/invocation/$REQUEST_ID/response
46+
POST http://localhost:9000/2018-06-01/runtime/invocation/$REQUEST_ID/error
47+
POST http://localhost:9000/2018-06-01/runtime/init/error
48+
```
49+
50+
In addition to an endpoint that allows you to stage request events for your runtime to invoke:
51+
52+
```text
53+
POST http://localhost:9000/events/next
54+
```
55+
56+
The runtime will serve events that have been POSTed to the `/events/next` endpoint sequentially each time the `/invocation/next` endpoint is called (or will return an empty response when there is no pending event).
57+
Invocation requests will include headers to emulate the Lambda Runtime interface as well, and expects that Request IDs are included with calls to `/response` and `/error` just as the Lambda service would.

Diff for: src/main/kotlin/com/batchofcode/runtimelocal/handler/RootHandler.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ fun main() {
1616
println("Started Lambda Runtime Local on Port $port")
1717
println("Available Lambda Runtime Endpoints ------------------------------------------------")
1818
println("GET invocations - http://localhost:$port/2018-06-01/runtime/invocation/next")
19-
println("POST invocation error - http://localhost:$port/2018-06-01/runtime/invocation/error")
19+
println("POST invocation response - http://localhost:$port/2018-06-01/runtime/invocation/\$REQUEST_ID/response")
20+
println("POST invocation error - http://localhost:$port/2018-06-01/runtime/invocation/\$REQUEST_ID/error")
2021
println("POST init error - http://localhost:$port/2018-06-01/runtime/init/error")
2122
println("-----------------------------------------------------------------------------------")
2223
println("Helper Endpoints:")

0 commit comments

Comments
 (0)