code: function validateStreamEventRecord(record) {
    _validateStreamEventRecord(record);
  
    switch (record.eventSource) {
      case "aws:kinesis":
        // Kinesis stream event record
        _validateKinesisStreamEventRecord(record);
        break;
  
      case "aws:dynamodb":
        // DynamoDB stream event record
        _validateDynamoDBStreamEventRecord(record);
        break;
  
      default:
        // Only support Kinesis and DynamoDB stream event records
        throw new Error(`Unexpected eventSource (${record.eventSource}) on stream event record (${record.eventID})`);
    }
  }
docs: Validates the given stream event record and raises an error if the record fails to meet any of the following criteria:
  1. It must be a valid stream event record according to {@linkcode _validateStreamEventRecord};
  2. It must be either a Kinesis or DynamoDB stream event record; and
  3. It must contain the required properties expected of its type (based on its eventSource).
  
  @param {AnyStreamEventRecord|*} record - a Kinesis or DynamoDB stream event record
  @throws {Error} if the record is invalid