S3EventNotificationEventBridge: {
    account: string;
    detail: {
        bucket: { name: string };
        "deletion-type"?: string;
        "destination-access-tier"?: string;
        "destination-storage-class"?: string;
        object: {
            etag?: string;
            key: string;
            sequencer?: string;
            size?: number;
            "version-id"?: string;
        };
        reason?: string;
        "request-id": string;
        requester: string;
        "restore-expiry-time"?: string;
        "source-ip-address"?: string;
        "source-storage-class"?: string;
        version: string;
    };
    "detail-type": string;
    id: string;
    region: string;
    "replay-name"?: string;
    resources: string[];
    source: string;
    time: string;
    version: string;
}

Zod schema for S3 -> EventBridge -> Lambda event notification.

Type declaration

  • account: string
  • detail: {
        bucket: { name: string };
        "deletion-type"?: string;
        "destination-access-tier"?: string;
        "destination-storage-class"?: string;
        object: {
            etag?: string;
            key: string;
            sequencer?: string;
            size?: number;
            "version-id"?: string;
        };
        reason?: string;
        "request-id": string;
        requester: string;
        "restore-expiry-time"?: string;
        "source-ip-address"?: string;
        "source-storage-class"?: string;
        version: string;
    }
  • detail-type: string
  • id: string
  • region: string
  • Optionalreplay-name?: string
  • resources: string[]
  • source: string
  • time: string
  • version: string
{
"version": "0",
"id": "f5f1e65c-dc3a-93ca-6c1e-b1647eac7963",
"detail-type": "Object Created",
"source": "aws.s3",
"account": "123456789012",
"time": "2023-03-08T17:50:14Z",
"region": "eu-west-1",
"resources": [
"arn:aws:s3:::example-bucket"
],
"detail": {
"version": "0",
"bucket": {
"name": "example-bucket"
},
"object": {
"key": "IMG_m7fzo3.jpg",
"size": 184662,
"etag": "4e68adba0abe2dc8653dc3354e14c01d",
"sequencer": "006408CAD69598B05E"
},
"request-id": "57H08PA84AB1JZW0",
"requester": "123456789012",
"source-ip-address": "34.252.34.74",
"reason": "PutObject"
}
}