Type Alias DynamoDBStreamToKinesisRecordEvent
DynamoDBStreamToKinesisRecordEvent: {
awsRegion: string;
dynamodb: {
ApproximateCreationDateTime?: number;
Keys: Record<string, Record<string, any>>;
NewImage?: Record<string, any>;
OldImage?: Record<string, any>;
SizeBytes: number;
};
eventID: string;
eventName: "INSERT"
| "MODIFY"
| "REMOVE";
eventSource: "aws:dynamodb";
recordFormat: "application/json";
tableName: string;
userIdentity?:
| null
| { principalId: "dynamodb.amazonaws.com"; type: "Service" };
}
Type declaration
awsRegion: string
dynamodb: {
ApproximateCreationDateTime?: number;
Keys: Record<string, Record<string, any>>;
NewImage?: Record<string, any>;
OldImage?: Record<string, any>;
SizeBytes: number;
}
eventID: string
eventName: "INSERT" | "MODIFY" | "REMOVE"
eventSource: "aws:dynamodb"
recordFormat: "application/json"
tableName: string
OptionaluserIdentity?: null | { principalId: "dynamodb.amazonaws.com"; type: "Service" }
Zod schema for Amazon DynamoDB Stream event sent to an Amazon Kinesis Stream.
This schema is best used in conjunction with the
KinesisEnvelopewhen you want to work with the DynamoDB stream event coming from an Amazon Kinesis Stream.By default, we unmarshall the
dynamodb.Keys,dynamodb.NewImage, anddynamodb.OldImagefields for you.If you want to extend the schema and provide your own Zod schema for any of these fields, you can use the
DynamoDBMarshalledhelper. In that case, we won't unmarshall the other fields.To extend the schema, you can use the
DynamoDBStreamToKinesisRecordchild schema and theDynamoDBMarshalledhelper together.