Base Image for AWS Lambda using aux4
9.3K
aux4 is a CLI (Command-line Interface) generator for creating high-level scripts and automating daily tasks.
.aux4 file.{
"profiles": [
{
"name": "main",
"commands": [
{
"name": "hello",
"execute": [
"echo Hello ${event.name}"
],
"help": {
"text": "say hello"
}
}
]
}
]
}
FROM aux4/aws-lambda
COPY .aux4 ${LAMBDA_TASK_ROOT}
ENV AUX4_LAMBDA_MODE=HTTP # default is RAW
ENV AUX4_HTTP_STATUS_CODE_SUCCESS=201 # default is 200
ENV AUX4_HTTP_STATUS_CODE_ERROR=400 # default is 500
CMD ["hello"]
docker build -t myfunction:latest .
docker run -p 9000:8080 --rm myfunction:latest
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"name":"John Doe"}'
{"statusCode": 200, "body": "Hello John Doe"}
Content type
Image
Digest
sha256:f22a3a7a8…
Size
206.9 MB
Last updated
about 1 month ago
docker pull aux4/aws-lambda