AWS DynamoDB Stream Event

AWS DynamoDB Streams event with record changes, keys, and stream view type.

Report an issue
aws

Install

$ npx shadcn@latest add @open-types/aws-dynamodb-stream-event

Source

export type AWSDynamoDBStreamViewType =
  | "KEYS_ONLY"
  | "NEW_IMAGE"
  | "OLD_IMAGE"
  | "NEW_AND_OLD_IMAGES";

export interface AWSDynamoDBStreamRecord {
  Keys: Record<string, Record<string, unknown>>;
  NewImage?: Record<string, Record<string, unknown>>;
  OldImage?: Record<string, Record<string, unknown>>;
  SequenceNumber: string;
  SizeBytes: number;
  StreamViewType: AWSDynamoDBStreamViewType;
}

export type AWSDynamoDBEventName = "INSERT" | "MODIFY" | "REMOVE";

export interface AWSDynamoDBEventRecord {
  eventID: string;
  eventName: AWSDynamoDBEventName;
  eventVersion: string;
  eventSource: string;
  awsRegion: string;
  dynamodb: AWSDynamoDBStreamRecord;
}

export interface AWSDynamoDBStreamEvent {
  Records: AWSDynamoDBEventRecord[];
}
export type AWSDynamoDBStreamViewType =
  | "KEYS_ONLY"
  | "NEW_IMAGE"
  | "OLD_IMAGE"
  | "NEW_AND_OLD_IMAGES";

export interface AWSDynamoDBStreamRecord {
  Keys: Record<string, Record<string, unknown>>;
  NewImage?: Record<string, Record<string, unknown>>;
  OldImage?: Record<string, Record<string, unknown>>;
  SequenceNumber: string;
  SizeBytes: number;
  StreamViewType: AWSDynamoDBStreamViewType;
}

export type AWSDynamoDBEventName = "INSERT" | "MODIFY" | "REMOVE";

export interface AWSDynamoDBEventRecord {
  eventID: string;
  eventName: AWSDynamoDBEventName;
  eventVersion: string;
  eventSource: string;
  awsRegion: string;
  dynamodb: AWSDynamoDBStreamRecord;
}

export interface AWSDynamoDBStreamEvent {
  Records: AWSDynamoDBEventRecord[];
}