Type Alias S3SqsEventNotification
S3SqsEventNotification: {
Records: {
attributes: {
ApproximateFirstReceiveTimestamp: string;
ApproximateReceiveCount: string;
AWSTraceHeader?: string;
DeadLetterQueueSourceArn?: string;
MessageDeduplicationId?: string;
MessageGroupId?: string;
SenderId: string;
SentTimestamp: string;
SequenceNumber?: string;
};
awsRegion: string;
body: {
Records: {
awsRegion: string;
eventName: string;
eventSource: "aws:s3";
eventTime: string;
eventVersion: string;
glacierEventData?: {
restoreEventData: {
lifecycleRestorationExpiryTime: string;
lifecycleRestoreStorageClass: string;
};
};
requestParameters: { sourceIPAddress: string };
responseElements: { "x-amz-id-2": string; "x-amz-request-id": string };
s3: {
bucket: {
arn: string;
name: string;
ownerIdentity: { principalId: string };
};
configurationId: string;
object: {
eTag?: string;
key: string;
sequencer: string;
size?: number;
urlDecodedKey?: string;
versionId?: string;
};
s3SchemaVersion: string;
};
userIdentity: { principalId: string };
}[];
};
eventSource: "aws:sqs";
eventSourceARN: string;
md5OfBody: string;
md5OfMessageAttributes?: null
| string;
messageAttributes: Record<
string,
{
binaryListValues?: string[];
binaryValue?: string;
dataType: string;
stringListValues?: string[];
stringValue?: string;
},
>;
messageId: string;
receiptHandle: string;
}[];
}
Type declaration
Records: {
attributes: {
ApproximateFirstReceiveTimestamp: string;
ApproximateReceiveCount: string;
AWSTraceHeader?: string;
DeadLetterQueueSourceArn?: string;
MessageDeduplicationId?: string;
MessageGroupId?: string;
SenderId: string;
SentTimestamp: string;
SequenceNumber?: string;
};
awsRegion: string;
body: {
Records: {
awsRegion: string;
eventName: string;
eventSource: "aws:s3";
eventTime: string;
eventVersion: string;
glacierEventData?: {
restoreEventData: {
lifecycleRestorationExpiryTime: string;
lifecycleRestoreStorageClass: string;
};
};
requestParameters: { sourceIPAddress: string };
responseElements: { "x-amz-id-2": string; "x-amz-request-id": string };
s3: {
bucket: {
arn: string;
name: string;
ownerIdentity: { principalId: string };
};
configurationId: string;
object: {
eTag?: string;
key: string;
sequencer: string;
size?: number;
urlDecodedKey?: string;
versionId?: string;
};
s3SchemaVersion: string;
};
userIdentity: { principalId: string };
}[];
};
eventSource: "aws:sqs";
eventSourceARN: string;
md5OfBody: string;
md5OfMessageAttributes?: null
| string;
messageAttributes: Record<
string,
{
binaryListValues?: string[];
binaryValue?: string;
dataType: string;
stringListValues?: string[];
stringValue?: string;
},
>;
messageId: string;
receiptHandle: string;
}[]
Zod schema for S3 -> SQS -> Lambda event notification.
Each SQS record’s body field is automatically parsed from a JSON string and then validated as an S3 event.