Mayfly.Events.S3 (Mayfly v1.0.0-rc.1)

Copy Markdown View Source

Amazon S3 event notifications.

%Mayfly.Events.S3{records: [%{bucket: "my-bucket", key: "uploads/report 2026.pdf"}]} =
  Mayfly.Events.S3.decode(event)

key is URL-decoded (+ becomes a space, %xx sequences are decoded), which is the form you need for GetObject. event_name is kept as S3 sends it, e.g. "ObjectCreated:Put".

Summary

Functions

Decodes an S3 event.

Types

t()

@type t() :: %Mayfly.Events.S3{raw: map(), records: [Mayfly.Events.S3.Record.t()]}

Functions

decode(e)

@spec decode(map()) :: t()

Decodes an S3 event.