Modules
Mayfly – an AWS Lambda custom runtime for Elixir.
Entry point used by the generated bootstrap script
Per-invocation metadata, built from the GET /runtime/invocation/next
response headers and passed as the second argument to Mayfly.Handler.handle/3.
Builds the error document Lambda expects on /runtime/invocation/<id>/error
and /runtime/init/error
Typed decoders for the event shapes AWS services send to Lambda.
Amazon DynamoDB Streams events.
One stream record.
Amazon EventBridge events (custom events, scheduled rules, AWS service events).
HTTP events from API Gateway (REST v1 and HTTP v2), Lambda Function URLs (v2 shape) and Application Load Balancer, plus helpers that build the proxy response each of them expects.
A decoded HTTP request. See Mayfly.Events.HTTP.
Amazon Kinesis Data Streams events.
One Kinesis record.
Amazon S3 event notifications.
One S3 notification record.
Amazon SNS notifications delivered directly to Lambda.
One SNS notification.
Amazon SQS events.
One SQS message.
Internal Lambda extension: registers with the Extensions API, subscribes to
the Telemetry API, and turns platform telemetry into :telemetry events.
Minimal HTTP/1.1 client over :gen_tcp for the link-local Lambda Runtime API.
Behaviour for Lambda function handlers.
A small Lambda Runtime API emulator for local development and tests.
Logger formatter that emits one JSON object per line in the shape Lambda's advanced logging controls expect, so CloudWatch parses level, request id and tenant id
CloudWatch metrics without API calls, using the Embedded Metric Format: one JSON line on stdout that CloudWatch Logs turns into metrics.
One poller owns one concurrency slot: it long-polls /runtime/invocation/next,
runs the handler and posts the result, then polls again.
Turns mix release into a Lambda package builder.
What a handler may return inside {:ok, _}.
Client for the Lambda Runtime API
(version 2018-06-01), built on Mayfly.HTTP.
Graceful shutdown on SIGTERM.
Starts one Mayfly.Poller per concurrency slot after the handler has been
resolved and initialised exactly once.
Telemetry events emitted by the runtime. :telemetry is an optional
dependency; when it is not present the calls are no-ops.
Mix Tasks
Runs a set of checks that catch the common setup mistakes before you deploy
Generates a new Elixir project that builds and deploys as an AWS Lambda function with Mayfly.
Builds the Lambda package for a release configured with Mayfly.Release:
a lambda.zip (copied to --outdir) or, with --image, a container image
for Lambda's image package type.
Runs your handler exactly as Mayfly would inside Lambda – handler
resolution, init/1, JSON decoding, context, error formatting – against
Mayfly.LocalRuntime, and prints the response or error.