https://github.com/adrian-lin-1-0-0/local-go-lambda
Run AWS Lambda locally with Golang and docker image - provided:al2023
https://github.com/adrian-lin-1-0-0/local-go-lambda
al2023 aws-lambda aws-lambda-golang docker docker-image go golang lambda local provided
Last synced: 3 months ago
JSON representation
Run AWS Lambda locally with Golang and docker image - provided:al2023
- Host: GitHub
- URL: https://github.com/adrian-lin-1-0-0/local-go-lambda
- Owner: adrian-lin-1-0-0
- License: mit
- Created: 2024-01-19T09:52:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-22T17:39:36.000Z (over 1 year ago)
- Last Synced: 2025-01-25T18:43:41.845Z (4 months ago)
- Topics: al2023, aws-lambda, aws-lambda-golang, docker, docker-image, go, golang, lambda, local, provided
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Local go lambda
## Build Docker image
```bash
make build-image
```or
```bash
docker build --platform linux/amd64 -t local-go-lambda:latest .
```## Run Docker image
```bash
make run-image
```or
```bash
docker run -p 8080:8080 \
--entrypoint /usr/local/bin/aws-lambda-rie \
local-go-lambda:latest ./main
```## Test
```bash
curl "http://localhost:8080/2015-03-31/functions/function/invocations" -d '{}'
```
## Ref
- [AWS Lambda Runtime Interface Emulator](https://github.com/aws/aws-lambda-runtime-interface-emulator/)
- [Event Models](https://github.com/aws/aws-lambda-go/tree/main/events)
- [Using AWS Lambda with other services](https://docs.aws.amazon.com/lambda/latest/dg/lambda-services.html)