Skip to content
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
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ $ curl localhost:8000/any/path -H "example-header: any-value"
{"path":"any/path","method":"GET","headers":{"host":"localhost:8000","user-agent":"curl/7.81.0","accept":"*/*","example-header":"any-value"},"form":{}}
```

## Lambda

### Hello World

Path: [`./lambda/hello/`](./lambda/hello/)

Example usage:
```console
$ docker run -p 9000:8080 -d ghcr.io/tbobm/apps:lambda-hello-latest
$ curl "localhost:9000/2015-03-31/functions/function/invocations" -d '{}'
"Hello World"
```


## SQS

### Producer
Expand All @@ -41,3 +55,4 @@ Example usage:
$ docker run -e SQS_QUEUE_URL="https://sqs.eu-west-1.amazonaws.com/111111111111/my-queue" \
-it ghcr.io/tbobm/apps:sqs-producer-latest
```

5 changes: 5 additions & 0 deletions lambda/simple/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM public.ecr.aws/lambda/python:3.12 AS base

COPY . .

CMD ["handler.lambda_handler"]
3 changes: 3 additions & 0 deletions lambda/simple/handler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def lambda_handler(event, context):
print("Hello World")
return "Hello World"