Experimental project for running an AWS Lambda function in Go on provided.al2
runtime.
Using Lambda Provided Image
make lambda
docker run -p 9000:8080 -v "$(pwd)/bin/lambda/bootstrap:/var/runtime/bootstrap" public.ecr.aws/lambda/provided:al2 /var/runime/bootstrap
To test event:
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"hello":"world"}'
docker build -t mytestimg .
docker run -p 9000:8080 mytestimg
To test event:
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"hello":"world"}'
sam build
sam local start-lambda
To test event:
curl -XPOST "http://localhost:3001/2015-03-31/functions/goal2/invocations" -d '{"hello":"world"}'
NOTE: URL is different from other methods.