Variable S3SqsEventNotificationSchemaConst
S3SqsEventNotificationSchema: ZodObject<
{
Records: ZodArray<
ZodObject<
extendShape<
{
attributes: ZodObject<
{
ApproximateFirstReceiveTimestamp: ZodString;
ApproximateReceiveCount: ZodString;
AWSTraceHeader: ZodOptional<ZodString>;
DeadLetterQueueSourceArn: ZodOptional<ZodString>;
MessageDeduplicationId: ZodOptional<ZodString>;
MessageGroupId: ZodOptional<ZodString>;
SenderId: ZodString;
SentTimestamp: ZodString;
SequenceNumber: ZodOptional<ZodString>;
},
"strip",
ZodTypeAny,
{
ApproximateFirstReceiveTimestamp: string;
ApproximateReceiveCount: string;
AWSTraceHeader?: string;
DeadLetterQueueSourceArn?: string;
MessageDeduplicationId?: string;
MessageGroupId?: string;
SenderId: string;
SentTimestamp: string;
SequenceNumber?: string;
},
{
ApproximateFirstReceiveTimestamp: string;
ApproximateReceiveCount: string;
AWSTraceHeader?: string;
DeadLetterQueueSourceArn?: string;
MessageDeduplicationId?: string;
MessageGroupId?: string;
SenderId: string;
SentTimestamp: string;
SequenceNumber?: string;
},
>;
awsRegion: ZodString;
body: ZodString;
eventSource: ZodLiteral<"aws:sqs">;
eventSourceARN: ZodString;
md5OfBody: ZodString;
md5OfMessageAttributes: ZodNullable<ZodOptional<ZodString>>;
messageAttributes: ZodRecord<
ZodString,
ZodObject<
{
binaryListValues: ZodOptional<ZodArray<(...), (...)>>;
binaryValue: ZodOptional<ZodString>;
dataType: ZodString;
stringListValues: ZodOptional<ZodArray<(...), (...)>>;
stringValue: ZodOptional<ZodString>;
},
"strip",
ZodTypeAny,
{
binaryListValues?: (...)[];
binaryValue?: string;
dataType: string;
stringListValues?: (...)[];
stringValue?: string;
},
{
binaryListValues?: (...)[];
binaryValue?: string;
dataType: string;
stringListValues?: (...)[];
stringValue?: string;
},
>,
>;
messageId: ZodString;
receiptHandle: ZodString;
},
{
body: ZodPipeline<
ZodEffects<ZodString, any, string>,
ZodObject<
{
Records: ZodArray<
ZodObject<(...), (...), (...), (...), (...)>,
"many",
>;
},
"strip",
ZodTypeAny,
{
Records: {
awsRegion: ...;
eventName: ...;
eventSource: ...;
eventTime: ...;
eventVersion: ...;
glacierEventData?: ...;
requestParameters: ...;
responseElements: ...;
s3: ...;
userIdentity: ...;
}[];
},
{
Records: {
awsRegion: ...;
eventName: ...;
eventSource: ...;
eventTime: ...;
eventVersion: ...;
glacierEventData?: ...;
requestParameters: ...;
responseElements: ...;
s3: ...;
userIdentity: ...;
}[];
},
>,
>;
},
>,
"strip",
ZodTypeAny,
{
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: ...;
lifecycleRestoreStorageClass: ...;
};
};
requestParameters: { sourceIPAddress: string };
responseElements: {
"x-amz-id-2": string;
"x-amz-request-id": string;
};
s3: {
bucket: {
arn: string;
name: string;
ownerIdentity: { principalId: ... };
};
configurationId: string;
object: {
eTag?: (...)
| (...);
key: string;
sequencer?: (...) | (...);
size?: (...) | (...);
urlDecodedKey?: (...) | (...);
versionId?: (...) | (...);
};
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;
},
{
attributes: {
ApproximateFirstReceiveTimestamp: string;
ApproximateReceiveCount: string;
AWSTraceHeader?: string;
DeadLetterQueueSourceArn?: string;
MessageDeduplicationId?: string;
MessageGroupId?: string;
SenderId: string;
SentTimestamp: string;
SequenceNumber?: string;
};
awsRegion: string;
body: 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;
},
>,
"many",
>;
},
"strip",
ZodTypeAny,
{
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;
}[];
},
{
Records: {
attributes: {
ApproximateFirstReceiveTimestamp: string;
ApproximateReceiveCount: string;
AWSTraceHeader?: string;
DeadLetterQueueSourceArn?: string;
MessageDeduplicationId?: string;
MessageGroupId?: string;
SenderId: string;
SentTimestamp: string;
SequenceNumber?: string;
};
awsRegion: string;
body: 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.