Sign inSign up

aux4/aws-lambda

By aux4

•Updated about 1 month ago

Base Image for AWS Lambda using aux4

Image
Developer tools
1

9.3K

aux4/aws-lambda repository overview

⁠Overview

aux4⁠ is a CLI (Command-line Interface) generator for creating high-level scripts and automating daily tasks.

⁠Usage

⁠Create your .aux4 file.
{
  "profiles": [
    {
      "name": "main",
      "commands": [
        {
          "name": "hello",
          "execute": [
            "echo Hello ${event.name}"
          ],
          "help": {
            "text": "say hello"
          }
        }
      ]
    }
  ]
}
⁠Create your Dockerfile.
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"]
⁠Build your Docker image.
docker build -t myfunction:latest .
⁠Test Locally
⁠Start the container
docker run -p 9000:8080 --rm myfunction:latest
⁠Invoke the function
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"name":"John Doe"}'
{"statusCode": 200, "body": "Hello John Doe"}

Tag summary

Content type

Image

Digest

sha256:f22a3a7a8…

Size

206.9 MB

Last updated

about 1 month ago

docker pull aux4/aws-lambda