You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/14 15:32:00 UTC

[GitHub] [flink] dannycranmer commented on a change in pull request #18348: [FLINK-24905][connectors/kinesis] Adding support for Kinesis DataStream sink as kinesis table connector sink.

dannycranmer commented on a change in pull request #18348:
URL: https://github.com/apache/flink/pull/18348#discussion_r784865502



##########
File path: docs/content/docs/connectors/table/kinesis.md
##########
@@ -629,12 +636,71 @@ Connector Options
       <td style="word-wrap: break-word;">(none)</td>
       <td></td>
       <td>
-        Sink options for the <code>KinesisProducer</code>.
-        Suffix names must match the <a href="https://javadoc.io/static/com.amazonaws/amazon-kinesis-producer/0.14.0/com/amazonaws/services/kinesis/producer/KinesisProducerConfiguration.html">KinesisProducerConfiguration</a> setters in lower-case hyphenated style (for example, <code>sink.producer.collection-max-count</code> or <code>sink.producer.aggregation-max-count</code>).
-        The transformed action keys are passed to the <code>sink.producer.*</code> to <a href="https://javadoc.io/static/com.amazonaws/amazon-kinesis-producer/0.14.0/com/amazonaws/services/kinesis/producer/KinesisProducerConfiguration.html#fromProperties-java.util.Properties-">KinesisProducerConfigurations#fromProperties</a>.
-        Note that some of the defaults are overwritten by <code>KinesisConfigUtil</code>.
+        Deprecated options previously used by <code>KinesisProducer</code>.

Review comment:
       > KinesisProducer
   
   Do you mean `FlinkKinesisProducer`? I ithink we should refer to it as Legacy Sink

##########
File path: docs/content/docs/connectors/table/kinesis.md
##########
@@ -629,12 +636,71 @@ Connector Options
       <td style="word-wrap: break-word;">(none)</td>
       <td></td>
       <td>
-        Sink options for the <code>KinesisProducer</code>.
-        Suffix names must match the <a href="https://javadoc.io/static/com.amazonaws/amazon-kinesis-producer/0.14.0/com/amazonaws/services/kinesis/producer/KinesisProducerConfiguration.html">KinesisProducerConfiguration</a> setters in lower-case hyphenated style (for example, <code>sink.producer.collection-max-count</code> or <code>sink.producer.aggregation-max-count</code>).
-        The transformed action keys are passed to the <code>sink.producer.*</code> to <a href="https://javadoc.io/static/com.amazonaws/amazon-kinesis-producer/0.14.0/com/amazonaws/services/kinesis/producer/KinesisProducerConfiguration.html#fromProperties-java.util.Properties-">KinesisProducerConfigurations#fromProperties</a>.
-        Note that some of the defaults are overwritten by <code>KinesisConfigUtil</code>.
+        Deprecated options previously used by <code>KinesisProducer</code>.
+        Options with equivalant alternatives in <code>KinesisAsyncClient</code> are matched 

Review comment:
       > KinesisAsyncClient
   
   Is this right? You mean `KinesisDataStreamsSink` ?

##########
File path: flink-connectors/flink-connector-aws-base/src/test/java/org/apache/flink/connector/aws/table/util/AWSOptionsUtilTest.java
##########
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.aws.table.util;
+
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/** Unit tests for {@link AWSOptionUtils}. */
+public class AWSOptionsUtilTest {
+
+    @Test
+    public void testAWSKeyMapper() {
+        AWSOptionUtils awsOptionUtils = new AWSOptionUtils(getDefaultAWSConfigurations());
+        Map<String, String> actualMappedProperties = awsOptionUtils.getProcessedResolvedOptions();
+        Map<String, String> expectedProperties = getDefaultExpectedAWSConfigurations();
+        Assertions.assertThat(actualMappedProperties).isEqualTo(expectedProperties);
+    }
+
+    @Test
+    public void testAWSKeySelectionAndMapping() {
+        Map<String, String> resolvedTableOptions = getDefaultAWSConfigurations();
+        resolvedTableOptions.put("non.aws.key1", "value1");
+        resolvedTableOptions.put("non.aws.key2", "value2");
+        resolvedTableOptions.put("non.aws.key3", "value3");
+        resolvedTableOptions.put("non.aws.key4", "value4");
+        AWSOptionUtils awsOptionUtils = new AWSOptionUtils(resolvedTableOptions);
+        Map<String, String> actualMappedProperties = awsOptionUtils.getProcessedResolvedOptions();
+        Map<String, String> expectedProperties = getDefaultExpectedAWSConfigurations();
+        Assertions.assertThat(actualMappedProperties).isEqualTo(expectedProperties);
+    }
+
+    @Test
+    public void testGoodAWSProperties() {
+        AWSOptionUtils awsOptionUtils = new AWSOptionUtils(getDefaultAWSConfigurations());
+        Properties expectedProperties = new Properties();
+        expectedProperties.putAll(getDefaultExpectedAWSConfigurations());
+        Properties actualProperties = awsOptionUtils.getValidatedConfigurations();
+        Assertions.assertThat(actualProperties).isEqualTo(expectedProperties);
+    }
+
+    @Test
+    public void testBadAWSRegion() {
+        Map<String, String> defaultProperties = getDefaultAWSConfigurations();
+        defaultProperties.put("aws.region", "invalid-aws-region");
+        AWSOptionUtils awsOptionUtils = new AWSOptionUtils(defaultProperties);
+        Assertions.assertThatExceptionOfType(IllegalArgumentException.class)
+                .isThrownBy(awsOptionUtils::getValidatedConfigurations)
+                .withMessageContaining("Invalid AWS region set in config.");
+    }
+
+    @Test
+    public void testMissingAWSCredentials() {
+        Map<String, String> defaultProperties = getDefaultAWSConfigurations();
+        defaultProperties.remove("aws.credentials.basic.accesskeyid");
+        AWSOptionUtils awsOptionUtils = new AWSOptionUtils(defaultProperties);
+        Assertions.assertThatExceptionOfType(IllegalArgumentException.class)
+                .isThrownBy(awsOptionUtils::getValidatedConfigurations)
+                .withMessageContaining(
+                        String.format(
+                                "Please set values for AWS Access Key ID ('%s') "
+                                        + "and Secret Key ('%s') when using the BASIC AWS credential provider type.",
+                                AWSConfigConstants.AWS_ACCESS_KEY_ID,
+                                AWSConfigConstants.AWS_SECRET_ACCESS_KEY));
+    }
+
+    @Test
+    public void testInvalidTrustAllCertificatesOption() {
+        Map<String, String> defaultProperties = getDefaultAWSConfigurations();
+        defaultProperties.put("aws.trust.all.certificates", "invalid-boolean");
+        AWSOptionUtils awsOptionUtils = new AWSOptionUtils(defaultProperties);
+        Assertions.assertThatExceptionOfType(IllegalArgumentException.class)
+                .isThrownBy(awsOptionUtils::getValidatedConfigurations)
+                .withMessageContaining(
+                        String.format(
+                                "Invalid %s value, must be a boolean.",
+                                AWSConfigConstants.TRUST_ALL_CERTIFICATES));
+    }
+
+    private static Map<String, String> getDefaultAWSConfigurations() {
+        Map<String, String> defaultAWSConfigurations = new HashMap<String, String>();
+        defaultAWSConfigurations.put("aws.region", "us-west-2");
+        defaultAWSConfigurations.put("aws.credentials.provider", "BASIC");
+        defaultAWSConfigurations.put("aws.credentials.basic.accesskeyid", "ververicka");
+        defaultAWSConfigurations.put(
+                "aws.credentials.basic.secretkey", "SuperSecretSecretSquirrel");
+        defaultAWSConfigurations.put("aws.trust.all.certificates", "true");
+        return defaultAWSConfigurations;
+    }
+
+    private static Map<String, String> getDefaultExpectedAWSConfigurations() {
+        Map<String, String> defaultExpectedAWSConfigurations = new HashMap<String, String>();
+        defaultExpectedAWSConfigurations.put("aws.region", "us-west-2");
+        defaultExpectedAWSConfigurations.put("aws.credentials.provider", "BASIC");
+        defaultExpectedAWSConfigurations.put(
+                "aws.credentials.provider.basic.accesskeyid", "ververicka");
+        defaultExpectedAWSConfigurations.put(
+                "aws.credentials.provider.basic.secretkey", "SuperSecretSecretSquirrel");
+        defaultExpectedAWSConfigurations.put("aws.trust.all.certificates", "true");
+        return defaultExpectedAWSConfigurations;
+    }
+}

Review comment:
       nit: These do not need to be static

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDataStreamsConnectorOptionsUtils.java
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.table.util.AWSOptionUtils;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+import org.apache.flink.connector.base.table.sink.options.AsyncSinkConfigurationValidator;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.connector.kinesis.table.util.KinesisClientOptionsUtils;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/**
+ * Class for handling kinesis table options, including key mapping and validations and property
+ * extraction. Class uses options decorators {@link AWSOptionUtils}, {@link
+ * KinesisClientOptionsUtils} for handling each specified set of options.
+ */
+public class KinesisDataStreamsConnectorOptionsUtils extends AsyncSinkConfigurationValidator {

Review comment:
       All of the classes need to be annotated with an appropriate annotation to determine code compatibility guarantees:
   - https://github.com/apache/flink/tree/master/flink-annotations/src/main/java/org/apache/flink/annotation

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDataStreamsConnectorOptionsUtils.java
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.table.util.AWSOptionUtils;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+import org.apache.flink.connector.base.table.sink.options.AsyncSinkConfigurationValidator;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.connector.kinesis.table.util.KinesisClientOptionsUtils;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/**
+ * Class for handling kinesis table options, including key mapping and validations and property
+ * extraction. Class uses options decorators {@link AWSOptionUtils}, {@link
+ * KinesisClientOptionsUtils} for handling each specified set of options.
+ */
+public class KinesisDataStreamsConnectorOptionsUtils extends AsyncSinkConfigurationValidator {
+    private static final Logger LOG =
+            LoggerFactory.getLogger(KinesisDataStreamsConnectorOptionsUtils.class);
+
+    public static final String KINESIS_CLIENT_PROPERTIES_KEY = "sink.client.properties";
+
+    private final AWSOptionUtils awsOptionUtils;
+    private final KinesisClientOptionsUtils kinesisClientOptionsUtils;
+    private final KinesisProducerOptionsMapper kinesisProducerOptionsMapper;
+    private final Map<String, String> resolvedOptions;
+    private final ReadableConfig tableOptions;
+    private final KinesisDataStreamsSinkElementConverter.PartitionKeyGenerator<RowData> partitioner;
+
+    /**
+     * Prefixes of properties that are validated by downstream components and should not be
+     * validated by the Table API infrastructure.
+     */
+    private static final String[] NON_VALIDATED_PREFIXES =
+            new String[] {
+                AWSOptionUtils.AWS_PROPERTIES_PREFIX,
+                KinesisClientOptionsUtils.SINK_CLIENT_PREFIX,
+                KinesisProducerOptionsMapper.KINESIS_PRODUCER_PREFIX
+            };
+
+    protected static final Set<String> TABLE_LEVEL_OPTIONS =
+            new HashSet<>(
+                    Arrays.asList(
+                            STREAM.key(),
+                            FORMAT.key(),
+                            SINK_PARTITIONER.key(),
+                            SINK_FAIL_ON_ERROR.key(),
+                            SINK_PARTITIONER_FIELD_DELIMITER.key(),
+                            FLUSH_BUFFER_SIZE.key(),
+                            FLUSH_BUFFER_TIMEOUT.key(),
+                            MAX_BATCH_SIZE.key(),
+                            MAX_BUFFERED_REQUESTS.key(),
+                            MAX_IN_FLIGHT_REQUESTS.key()));
+
+    public KinesisDataStreamsConnectorOptionsUtils(
+            Map<String, String> options,
+            ReadableConfig tableOptions,
+            RowType physicalType,
+            List<String> partitionKeys,
+            ClassLoader classLoader) {
+        super(tableOptions);
+        this.resolvedOptions = filterTableOptions(options);
+        this.tableOptions = tableOptions;
+        this.awsOptionUtils = new AWSOptionUtils(resolvedOptions);
+        this.kinesisClientOptionsUtils = new KinesisClientOptionsUtils(resolvedOptions);
+        this.kinesisProducerOptionsMapper = new KinesisProducerOptionsMapper(resolvedOptions);
+        this.partitioner =
+                KinesisPartitionKeyGeneratorFactory.getKinesisPartitioner(
+                        tableOptions, physicalType, partitionKeys, classLoader);
+    }
+
+    public Properties getValidatedSinkConfigurations() {
+        Properties properties = super.getValidatedConfigurations();
+        properties.put(STREAM.key(), tableOptions.get(STREAM));
+        Properties awsProps = awsOptionUtils.getValidatedConfigurations();
+        Properties kinesisClientProps = kinesisClientOptionsUtils.getValidatedConfigurations();
+
+        for (Map.Entry<Object, Object> entry : awsProps.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                kinesisClientProps.put(entry.getKey(), entry.getValue());
+            }
+        }

Review comment:
       nit: Can be simplified (and below):
   
   ```
   awsProps.forEach(kinesisClientProps::putIfAbsent);
   ```

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDataStreamsConnectorOptionsUtils.java
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.table.util.AWSOptionUtils;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+import org.apache.flink.connector.base.table.sink.options.AsyncSinkConfigurationValidator;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.connector.kinesis.table.util.KinesisClientOptionsUtils;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/**
+ * Class for handling kinesis table options, including key mapping and validations and property
+ * extraction. Class uses options decorators {@link AWSOptionUtils}, {@link
+ * KinesisClientOptionsUtils} for handling each specified set of options.
+ */
+public class KinesisDataStreamsConnectorOptionsUtils extends AsyncSinkConfigurationValidator {
+    private static final Logger LOG =
+            LoggerFactory.getLogger(KinesisDataStreamsConnectorOptionsUtils.class);
+
+    public static final String KINESIS_CLIENT_PROPERTIES_KEY = "sink.client.properties";
+
+    private final AWSOptionUtils awsOptionUtils;
+    private final KinesisClientOptionsUtils kinesisClientOptionsUtils;
+    private final KinesisProducerOptionsMapper kinesisProducerOptionsMapper;
+    private final Map<String, String> resolvedOptions;
+    private final ReadableConfig tableOptions;
+    private final KinesisDataStreamsSinkElementConverter.PartitionKeyGenerator<RowData> partitioner;
+
+    /**
+     * Prefixes of properties that are validated by downstream components and should not be
+     * validated by the Table API infrastructure.
+     */
+    private static final String[] NON_VALIDATED_PREFIXES =
+            new String[] {
+                AWSOptionUtils.AWS_PROPERTIES_PREFIX,
+                KinesisClientOptionsUtils.SINK_CLIENT_PREFIX,
+                KinesisProducerOptionsMapper.KINESIS_PRODUCER_PREFIX
+            };
+
+    protected static final Set<String> TABLE_LEVEL_OPTIONS =
+            new HashSet<>(
+                    Arrays.asList(
+                            STREAM.key(),
+                            FORMAT.key(),
+                            SINK_PARTITIONER.key(),
+                            SINK_FAIL_ON_ERROR.key(),
+                            SINK_PARTITIONER_FIELD_DELIMITER.key(),
+                            FLUSH_BUFFER_SIZE.key(),
+                            FLUSH_BUFFER_TIMEOUT.key(),
+                            MAX_BATCH_SIZE.key(),
+                            MAX_BUFFERED_REQUESTS.key(),
+                            MAX_IN_FLIGHT_REQUESTS.key()));
+
+    public KinesisDataStreamsConnectorOptionsUtils(
+            Map<String, String> options,
+            ReadableConfig tableOptions,
+            RowType physicalType,
+            List<String> partitionKeys,
+            ClassLoader classLoader) {
+        super(tableOptions);
+        this.resolvedOptions = filterTableOptions(options);
+        this.tableOptions = tableOptions;
+        this.awsOptionUtils = new AWSOptionUtils(resolvedOptions);
+        this.kinesisClientOptionsUtils = new KinesisClientOptionsUtils(resolvedOptions);
+        this.kinesisProducerOptionsMapper = new KinesisProducerOptionsMapper(resolvedOptions);
+        this.partitioner =
+                KinesisPartitionKeyGeneratorFactory.getKinesisPartitioner(
+                        tableOptions, physicalType, partitionKeys, classLoader);
+    }
+
+    public Properties getValidatedSinkConfigurations() {
+        Properties properties = super.getValidatedConfigurations();
+        properties.put(STREAM.key(), tableOptions.get(STREAM));
+        Properties awsProps = awsOptionUtils.getValidatedConfigurations();
+        Properties kinesisClientProps = kinesisClientOptionsUtils.getValidatedConfigurations();
+
+        for (Map.Entry<Object, Object> entry : awsProps.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                kinesisClientProps.put(entry.getKey(), entry.getValue());
+            }
+        }
+        Properties producerFallbackProperties =
+                kinesisProducerOptionsMapper.getValidatedConfigurations();
+        for (Map.Entry<Object, Object> entry : producerFallbackProperties.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                properties.put(entry.getKey(), entry.getValue());
+            }
+        }
+
+        properties.put(KINESIS_CLIENT_PROPERTIES_KEY, kinesisClientProps);
+        properties.put(SINK_PARTITIONER.key(), this.partitioner);
+
+        if (tableOptions.getOptional(SINK_FAIL_ON_ERROR).isPresent()) {
+            properties.put(
+                    SINK_FAIL_ON_ERROR.key(), tableOptions.getOptional(SINK_FAIL_ON_ERROR).get());
+        }
+        if (!awsProps.containsKey(AWSConfigConstants.AWS_REGION)) {
+            // per requirement in Amazon Kinesis DataStream
+            throw new IllegalArgumentException(
+                    String.format(
+                            "For FlinkKinesisSink AWS region ('%s') must be set in the config.",
+                            AWSConfigConstants.AWS_REGION));
+        }
+        return properties;
+    }
+
+    public List<String> getNonValidatedPrefixes() {
+        return Arrays.asList(NON_VALIDATED_PREFIXES);
+    }
+
+    public static Map<String, String> filterTableOptions(Map<String, String> options) {
+        Map<String, String> resolvedOptions = new HashMap<>();
+        // filtering out Table level options as they are handled by factory utils.
+        options.entrySet().stream()
+                .filter(entry -> !TABLE_LEVEL_OPTIONS.contains(entry.getKey()))
+                .forEach(entry -> resolvedOptions.put(entry.getKey(), entry.getValue()));
+        return resolvedOptions;
+    }
+
+    /** Class for Mapping and validation of deprecated producer options. */
+    @Internal
+    public static class KinesisProducerOptionsMapper
+            implements TableOptionsUtils, ConfigurationValidator {
+        private static final String KINESIS_PRODUCER_PREFIX = "sink.producer.";
+        private static final Map<String, String> kinesisProducerFallbackKeys = new HashMap<>();
+        private static final Set<String> kinesisProducerSkipKeys = new HashSet<>();
+        private static final String KINESIS_PRODUCER_ENDPOINT = "sink.producer.kinesis-endpoint";
+        private static final String KINESIS_PRODUCER_PORT = "sink.producer.kinesis-port";
+        private static final String KINESIS_PRODUCER_AGGREGATION =
+                "sink.producer.aggregation-enabled";
+        private static final String KINESIS_PRODUCER_VERIFY_CERTIFICATE =
+                "sink.producer.verify-certificate";
+
+        static {
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.record-max-buffered-time", FLUSH_BUFFER_TIMEOUT.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.collection-max-size", MAX_BATCH_SIZE.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.collection-max-count", MAX_IN_FLIGHT_REQUESTS.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.fail-on-error", SINK_FAIL_ON_ERROR.key());
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_ENDPOINT);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_PORT);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_AGGREGATION);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_VERIFY_CERTIFICATE);

Review comment:
       Are these keys that are supported so we skip them? If so, why is aggregation in here?

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDataStreamsConnectorOptionsUtils.java
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.table.util.AWSOptionUtils;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+import org.apache.flink.connector.base.table.sink.options.AsyncSinkConfigurationValidator;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.connector.kinesis.table.util.KinesisClientOptionsUtils;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/**
+ * Class for handling kinesis table options, including key mapping and validations and property
+ * extraction. Class uses options decorators {@link AWSOptionUtils}, {@link
+ * KinesisClientOptionsUtils} for handling each specified set of options.
+ */
+public class KinesisDataStreamsConnectorOptionsUtils extends AsyncSinkConfigurationValidator {
+    private static final Logger LOG =
+            LoggerFactory.getLogger(KinesisDataStreamsConnectorOptionsUtils.class);
+
+    public static final String KINESIS_CLIENT_PROPERTIES_KEY = "sink.client.properties";
+
+    private final AWSOptionUtils awsOptionUtils;
+    private final KinesisClientOptionsUtils kinesisClientOptionsUtils;
+    private final KinesisProducerOptionsMapper kinesisProducerOptionsMapper;
+    private final Map<String, String> resolvedOptions;
+    private final ReadableConfig tableOptions;
+    private final KinesisDataStreamsSinkElementConverter.PartitionKeyGenerator<RowData> partitioner;
+
+    /**
+     * Prefixes of properties that are validated by downstream components and should not be
+     * validated by the Table API infrastructure.
+     */
+    private static final String[] NON_VALIDATED_PREFIXES =
+            new String[] {
+                AWSOptionUtils.AWS_PROPERTIES_PREFIX,
+                KinesisClientOptionsUtils.SINK_CLIENT_PREFIX,
+                KinesisProducerOptionsMapper.KINESIS_PRODUCER_PREFIX
+            };
+
+    protected static final Set<String> TABLE_LEVEL_OPTIONS =
+            new HashSet<>(
+                    Arrays.asList(
+                            STREAM.key(),
+                            FORMAT.key(),
+                            SINK_PARTITIONER.key(),
+                            SINK_FAIL_ON_ERROR.key(),
+                            SINK_PARTITIONER_FIELD_DELIMITER.key(),
+                            FLUSH_BUFFER_SIZE.key(),
+                            FLUSH_BUFFER_TIMEOUT.key(),
+                            MAX_BATCH_SIZE.key(),
+                            MAX_BUFFERED_REQUESTS.key(),
+                            MAX_IN_FLIGHT_REQUESTS.key()));
+
+    public KinesisDataStreamsConnectorOptionsUtils(
+            Map<String, String> options,
+            ReadableConfig tableOptions,
+            RowType physicalType,
+            List<String> partitionKeys,
+            ClassLoader classLoader) {
+        super(tableOptions);
+        this.resolvedOptions = filterTableOptions(options);
+        this.tableOptions = tableOptions;
+        this.awsOptionUtils = new AWSOptionUtils(resolvedOptions);
+        this.kinesisClientOptionsUtils = new KinesisClientOptionsUtils(resolvedOptions);
+        this.kinesisProducerOptionsMapper = new KinesisProducerOptionsMapper(resolvedOptions);
+        this.partitioner =
+                KinesisPartitionKeyGeneratorFactory.getKinesisPartitioner(
+                        tableOptions, physicalType, partitionKeys, classLoader);
+    }
+
+    public Properties getValidatedSinkConfigurations() {
+        Properties properties = super.getValidatedConfigurations();
+        properties.put(STREAM.key(), tableOptions.get(STREAM));
+        Properties awsProps = awsOptionUtils.getValidatedConfigurations();
+        Properties kinesisClientProps = kinesisClientOptionsUtils.getValidatedConfigurations();
+
+        for (Map.Entry<Object, Object> entry : awsProps.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                kinesisClientProps.put(entry.getKey(), entry.getValue());
+            }
+        }
+        Properties producerFallbackProperties =
+                kinesisProducerOptionsMapper.getValidatedConfigurations();
+        for (Map.Entry<Object, Object> entry : producerFallbackProperties.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                properties.put(entry.getKey(), entry.getValue());
+            }
+        }
+
+        properties.put(KINESIS_CLIENT_PROPERTIES_KEY, kinesisClientProps);
+        properties.put(SINK_PARTITIONER.key(), this.partitioner);
+
+        if (tableOptions.getOptional(SINK_FAIL_ON_ERROR).isPresent()) {
+            properties.put(
+                    SINK_FAIL_ON_ERROR.key(), tableOptions.getOptional(SINK_FAIL_ON_ERROR).get());
+        }
+        if (!awsProps.containsKey(AWSConfigConstants.AWS_REGION)) {
+            // per requirement in Amazon Kinesis DataStream
+            throw new IllegalArgumentException(
+                    String.format(
+                            "For FlinkKinesisSink AWS region ('%s') must be set in the config.",
+                            AWSConfigConstants.AWS_REGION));
+        }
+        return properties;
+    }
+
+    public List<String> getNonValidatedPrefixes() {
+        return Arrays.asList(NON_VALIDATED_PREFIXES);
+    }
+
+    public static Map<String, String> filterTableOptions(Map<String, String> options) {
+        Map<String, String> resolvedOptions = new HashMap<>();
+        // filtering out Table level options as they are handled by factory utils.
+        options.entrySet().stream()
+                .filter(entry -> !TABLE_LEVEL_OPTIONS.contains(entry.getKey()))
+                .forEach(entry -> resolvedOptions.put(entry.getKey(), entry.getValue()));
+        return resolvedOptions;
+    }
+
+    /** Class for Mapping and validation of deprecated producer options. */
+    @Internal
+    public static class KinesisProducerOptionsMapper
+            implements TableOptionsUtils, ConfigurationValidator {
+        private static final String KINESIS_PRODUCER_PREFIX = "sink.producer.";
+        private static final Map<String, String> kinesisProducerFallbackKeys = new HashMap<>();
+        private static final Set<String> kinesisProducerSkipKeys = new HashSet<>();
+        private static final String KINESIS_PRODUCER_ENDPOINT = "sink.producer.kinesis-endpoint";
+        private static final String KINESIS_PRODUCER_PORT = "sink.producer.kinesis-port";
+        private static final String KINESIS_PRODUCER_AGGREGATION =
+                "sink.producer.aggregation-enabled";
+        private static final String KINESIS_PRODUCER_VERIFY_CERTIFICATE =
+                "sink.producer.verify-certificate";
+
+        static {
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.record-max-buffered-time", FLUSH_BUFFER_TIMEOUT.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.collection-max-size", MAX_BATCH_SIZE.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.collection-max-count", MAX_IN_FLIGHT_REQUESTS.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.fail-on-error", SINK_FAIL_ON_ERROR.key());
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_ENDPOINT);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_PORT);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_AGGREGATION);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_VERIFY_CERTIFICATE);
+        }
+
+        private final Map<String, String> resolvedOptions;
+
+        public KinesisProducerOptionsMapper(Map<String, String> resolvedOptions) {
+            this.resolvedOptions = resolvedOptions;
+        }
+
+        @Override
+        public Properties getValidatedConfigurations() {
+            Properties properties = new Properties();
+            properties.putAll(getProcessedResolvedOptions());
+
+            Optional.ofNullable(properties.getProperty(FLUSH_BUFFER_TIMEOUT.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveLongProperty(
+                                        properties,
+                                        FLUSH_BUFFER_TIMEOUT.key(),
+                                        "Invalid option flush buffer size. Must be a positive integer");
+                                properties.put(FLUSH_BUFFER_TIMEOUT.key(), Long.parseLong(key));
+                            });
+
+            Optional.ofNullable(properties.getProperty(MAX_BATCH_SIZE.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveIntProperty(
+                                        properties,
+                                        MAX_BATCH_SIZE.key(),
+                                        "Invalid option batch size. Must be a positive integer");
+                                properties.put(MAX_BATCH_SIZE.key(), Integer.parseInt(key));
+                            });
+
+            Optional.ofNullable(properties.getProperty(MAX_IN_FLIGHT_REQUESTS.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveIntProperty(
+                                        properties,
+                                        MAX_IN_FLIGHT_REQUESTS.key(),
+                                        "Invalid option maximum inflight requests. Must be a positive integer");
+                                properties.put(MAX_IN_FLIGHT_REQUESTS.key(), Integer.parseInt(key));
+                            });
+
+            Optional.ofNullable(properties.getProperty(SINK_FAIL_ON_ERROR.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalBooleanProperty(
+                                        properties,
+                                        SINK_FAIL_ON_ERROR.key(),
+                                        "Invalid option fail on error. Must be a boolean");
+                                properties.put(SINK_FAIL_ON_ERROR.key(), Boolean.parseBoolean(key));
+                            });
+
+            return properties;
+        }
+
+        @Override
+        public Map<String, String> getProcessedResolvedOptions() {
+            Map<String, String> processedResolvedOptions = new HashMap<>();
+            for (String key : resolvedOptions.keySet()) {
+                if (key.startsWith(KINESIS_PRODUCER_PREFIX)) {
+                    Optional.ofNullable(kinesisProducerFallbackKeys.get(key))
+                            .ifPresent(
+                                    mappedKey ->
+                                            processedResolvedOptions.put(
+                                                    mappedKey, resolvedOptions.get(key)));
+                    if (!kinesisProducerFallbackKeys.containsKey(key)
+                            && !kinesisProducerSkipKeys.contains(key)) {
+                        LOG.warn(
+                                String.format(
+                                        "Key %s is unsupported by Kinesis Datastream Sink", key));
+                    }
+                }
+            }
+
+            // reconstructing end-point from legacy end-point and port
+            if (resolvedOptions.containsKey(KINESIS_PRODUCER_ENDPOINT)) {
+                if (resolvedOptions.containsKey(KINESIS_PRODUCER_PORT)) {
+                    processedResolvedOptions.putIfAbsent(
+                            AWSConfigConstants.AWS_ENDPOINT,
+                            String.format(
+                                    "https://%s:%s",
+                                    resolvedOptions.get(KINESIS_PRODUCER_ENDPOINT),
+                                    resolvedOptions.get(KINESIS_PRODUCER_PORT)));
+                } else {
+                    processedResolvedOptions.putIfAbsent(
+                            AWSConfigConstants.AWS_ENDPOINT,
+                            String.format(
+                                    "https://%s", resolvedOptions.get(KINESIS_PRODUCER_ENDPOINT)));
+                }
+            }
+
+            // transforming verify certificate options

Review comment:
       nit: consider breaking to private methods when you write comments like this. Usually it is indicative of a bloated method. `transformVerifyCertificateOptions()`

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/options/ConfigurationValidator.java
##########
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table.options;
+
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Properties;
+
+/**
+ * Interface for classes that validate connector specific table options, including common utils for
+ * validation.
+ */
+@PublicEvolving
+public interface ConfigurationValidator {
+
+    /// Interface

Review comment:
       nit: Why three `///` ?

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/AsyncSinkConnectorOptions.java
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+
+/**
+ * Optional Options for {@link AsyncDynamicTableSinkFactory} representing fields of {@link
+ * org.apache.flink.connector.base.sink.AsyncSinkBase}.
+ */
+@PublicEvolving
+public class AsyncSinkConnectorOptions {
+
+    public static final ConfigOption<Integer> MAX_BATCH_SIZE =
+            ConfigOptions.key("sink.batch.max-size")
+                    .intType()
+                    .noDefaultValue()
+                    .withDescription(
+                            "Maximum number of elements that may be passed"
+                                    + " in a list to be written downstream.");
+
+    public static final ConfigOption<Integer> MAX_IN_FLIGHT_REQUESTS =
+            ConfigOptions.key("sink.requests.max-inflight")
+                    .intType()
+                    .noDefaultValue()
+                    .withDescription(
+                            "Request threshold for uncompleted requests before blocking new write requests.");
+
+    public static final ConfigOption<Integer> MAX_BUFFERED_REQUESTS =
+            ConfigOptions.key("sink.requests.max-buffered")
+                    .intType()
+                    .noDefaultValue()
+                    .withDescription("Request buffer threshold for blocking new write requests.");

Review comment:
       nit: Unit is not clear here. "Maximum number of buffered records before applying backpressure"

##########
File path: flink-connectors/flink-connector-aws-base/src/main/java/org/apache/flink/connector/aws/table/util/AWSOptionUtils.java
##########
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.aws.table.util;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.util.AWSGeneralUtil;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/** Handler for AWS specific table options. */
+@PublicEvolving
+public class AWSOptionUtils implements TableOptionsUtils, ConfigurationValidator {
+
+    private final Map<String, String> resolvedOptions;
+
+    public AWSOptionUtils(Map<String, String> resolvedOptions) {
+        this.resolvedOptions = resolvedOptions;
+    }
+
+    /** Prefix for properties defined in {@link AWSConfigConstants}. */
+    public static final String AWS_PROPERTIES_PREFIX = "aws.";

Review comment:
       `public static` should go at top of file

##########
File path: flink-connectors/flink-connector-aws-base/src/main/java/org/apache/flink/connector/aws/util/AWSGeneralUtil.java
##########
@@ -175,6 +175,54 @@ public static AwsCredentialsProvider getProfileCredentialProvider(
         return profileBuilder.build();
     }
 
+    public static void validateAwsConfigurations(Properties config) {

Review comment:
       Can we drop the `s`? `validateAwsConfiguration`

##########
File path: flink-connectors/flink-connector-aws-base/src/test/java/org/apache/flink/connector/aws/table/util/AWSOptionsUtilTest.java
##########
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.aws.table.util;
+
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/** Unit tests for {@link AWSOptionUtils}. */
+public class AWSOptionsUtilTest {

Review comment:
       nit: The lack of new lines (whitespace) in this file reduce readability in my opinion

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/pom.xml
##########
@@ -82,6 +82,13 @@ under the License.
 			<version>${aws.sdk.version}</version>

Review comment:
       Are we renaming `flink-connector-aws-kinesis-data-streams` to `flink-connector-aws-kinesis-streams` in this PR or a follow up?

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisConnectorOptions.java
##########
@@ -64,7 +65,7 @@
                                                     "fixed (each Flink partition ends up in at most one Kinesis shard)"),
                                             text(
                                                     "custom class name (use a custom %s subclass)",
-                                                    text(KinesisPartitioner.class.getName())))
+                                                    text(PartitionKeyGenerator.class.getName())))

Review comment:
       Do we have a task for a "migration" guide? If so, we should call out these sort of changes

##########
File path: flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/KinesisPartitioner.java
##########
@@ -18,6 +18,7 @@
 package org.apache.flink.streaming.connectors.kinesis;

Review comment:
       This should be moved to the new maven module?

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/FixedKinesisKeyGenerator.java
##########
@@ -29,13 +30,12 @@
  * <p>This is achieved by using the index of the producer task as a {@code PartitionKey}.
  */
 @PublicEvolving
-public final class FixedKinesisPartitioner<T> extends KinesisPartitioner<T> {
+public final class FixedKinesisKeyGenerator<T> implements PartitionKeyGenerator<T> {

Review comment:
       Can we rename to `FixedKinesisPartitionKeyGenerator`?

##########
File path: docs/content/docs/connectors/table/kinesis.md
##########
@@ -168,6 +168,13 @@ Connector Options
       <td>String</td>
       <td>The AWS endpoint for Kinesis (derived from the AWS region setting if not set). Either this or <code>aws.region</code> are required.</td>
     </tr>
+    <tr>

Review comment:
       There is nothing in the documentation about the Table API strategy we discussed. For example, Flink 1.15 gives you the legacy source and new sink using the `kinesis` label. Can you please add this to the Table API docs (unless it is further down)

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisConnectorOptions.java
##########
@@ -78,5 +79,10 @@
                                             code("PARTITION BY"))
                                     .build());
 
-    private KinesisConnectorOptions() {}
+    public static final ConfigOption<Boolean> SINK_FAIL_ON_ERROR =
+            ConfigOptions.key("sink.fail-on-error")
+                    .booleanType()
+                    .defaultValue(false)
+                    .withDescription(
+                            "Optional fail on error value for kinesis sink, default is false");

Review comment:
       Maybe this should describe the field, for example:
   
   `Determines whether an exception should fail the job`

##########
File path: flink-connectors/flink-connector-aws-base/src/main/java/org/apache/flink/connector/aws/table/util/AWSOptionUtils.java
##########
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.aws.table.util;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.util.AWSGeneralUtil;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/** Handler for AWS specific table options. */
+@PublicEvolving
+public class AWSOptionUtils implements TableOptionsUtils, ConfigurationValidator {
+
+    private final Map<String, String> resolvedOptions;
+
+    public AWSOptionUtils(Map<String, String> resolvedOptions) {
+        this.resolvedOptions = resolvedOptions;
+    }
+
+    /** Prefix for properties defined in {@link AWSConfigConstants}. */
+    public static final String AWS_PROPERTIES_PREFIX = "aws.";
+
+    @Override
+    public Map<String, String> getProcessedResolvedOptions() {
+        Map<String, String> mappedResolvedOptions = new HashMap<>();
+        for (String key : resolvedOptions.keySet()) {
+            if (key.startsWith(AWS_PROPERTIES_PREFIX)) {
+                mappedResolvedOptions.put(translateAwsKey(key), resolvedOptions.get(key));
+            }
+        }
+        return mappedResolvedOptions;
+    }
+
+    @Override
+    public List<String> getNonValidatedPrefixes() {
+        return Collections.singletonList(AWS_PROPERTIES_PREFIX);
+    }
+
+    @Override
+    public Properties getValidatedConfigurations() {
+        Properties awsConfigurations = new Properties();
+        Map<String, String> mappedProperties = getProcessedResolvedOptions();
+        for (Map.Entry<String, String> entry : mappedProperties.entrySet()) {
+            awsConfigurations.setProperty(entry.getKey(), entry.getValue());
+        }
+        validateAwsConfiguration(awsConfigurations);
+        ConfigurationValidator.validateOptionalBooleanProperty(
+                awsConfigurations,
+                AWSConfigConstants.TRUST_ALL_CERTIFICATES,
+                String.format(
+                        "Invalid %s value, must be a boolean.",
+                        AWSConfigConstants.TRUST_ALL_CERTIFICATES));
+        return awsConfigurations;
+    }
+
+    /** Map {@code scan.foo.bar} to {@code flink.foo.bar}. */
+    private static String translateAwsKey(String key) {
+        if (!key.endsWith("credentials.provider")) {
+            return key.replace("credentials.", "credentials.provider.");
+        } else {
+            return key;
+        }
+    }
+
+    /** Validate configuration properties related to Amazon AWS service. */
+    private static void validateAwsConfiguration(Properties config) {
+        AWSGeneralUtil.validateAwsConfigurations(config);
+    }

Review comment:
       Why do you have this method? Seems odd as a `static private` since it is not invoked from a static context

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDataStreamsConnectorOptionsUtils.java
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.table.util.AWSOptionUtils;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+import org.apache.flink.connector.base.table.sink.options.AsyncSinkConfigurationValidator;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.connector.kinesis.table.util.KinesisClientOptionsUtils;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/**
+ * Class for handling kinesis table options, including key mapping and validations and property
+ * extraction. Class uses options decorators {@link AWSOptionUtils}, {@link
+ * KinesisClientOptionsUtils} for handling each specified set of options.
+ */
+public class KinesisDataStreamsConnectorOptionsUtils extends AsyncSinkConfigurationValidator {
+    private static final Logger LOG =
+            LoggerFactory.getLogger(KinesisDataStreamsConnectorOptionsUtils.class);
+
+    public static final String KINESIS_CLIENT_PROPERTIES_KEY = "sink.client.properties";
+
+    private final AWSOptionUtils awsOptionUtils;
+    private final KinesisClientOptionsUtils kinesisClientOptionsUtils;
+    private final KinesisProducerOptionsMapper kinesisProducerOptionsMapper;
+    private final Map<String, String> resolvedOptions;
+    private final ReadableConfig tableOptions;
+    private final KinesisDataStreamsSinkElementConverter.PartitionKeyGenerator<RowData> partitioner;
+
+    /**
+     * Prefixes of properties that are validated by downstream components and should not be
+     * validated by the Table API infrastructure.
+     */
+    private static final String[] NON_VALIDATED_PREFIXES =
+            new String[] {
+                AWSOptionUtils.AWS_PROPERTIES_PREFIX,
+                KinesisClientOptionsUtils.SINK_CLIENT_PREFIX,
+                KinesisProducerOptionsMapper.KINESIS_PRODUCER_PREFIX
+            };
+
+    protected static final Set<String> TABLE_LEVEL_OPTIONS =
+            new HashSet<>(
+                    Arrays.asList(
+                            STREAM.key(),
+                            FORMAT.key(),
+                            SINK_PARTITIONER.key(),
+                            SINK_FAIL_ON_ERROR.key(),
+                            SINK_PARTITIONER_FIELD_DELIMITER.key(),
+                            FLUSH_BUFFER_SIZE.key(),
+                            FLUSH_BUFFER_TIMEOUT.key(),
+                            MAX_BATCH_SIZE.key(),
+                            MAX_BUFFERED_REQUESTS.key(),
+                            MAX_IN_FLIGHT_REQUESTS.key()));
+
+    public KinesisDataStreamsConnectorOptionsUtils(
+            Map<String, String> options,
+            ReadableConfig tableOptions,
+            RowType physicalType,
+            List<String> partitionKeys,
+            ClassLoader classLoader) {
+        super(tableOptions);
+        this.resolvedOptions = filterTableOptions(options);
+        this.tableOptions = tableOptions;
+        this.awsOptionUtils = new AWSOptionUtils(resolvedOptions);
+        this.kinesisClientOptionsUtils = new KinesisClientOptionsUtils(resolvedOptions);
+        this.kinesisProducerOptionsMapper = new KinesisProducerOptionsMapper(resolvedOptions);
+        this.partitioner =
+                KinesisPartitionKeyGeneratorFactory.getKinesisPartitioner(
+                        tableOptions, physicalType, partitionKeys, classLoader);
+    }
+
+    public Properties getValidatedSinkConfigurations() {
+        Properties properties = super.getValidatedConfigurations();
+        properties.put(STREAM.key(), tableOptions.get(STREAM));
+        Properties awsProps = awsOptionUtils.getValidatedConfigurations();
+        Properties kinesisClientProps = kinesisClientOptionsUtils.getValidatedConfigurations();
+
+        for (Map.Entry<Object, Object> entry : awsProps.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                kinesisClientProps.put(entry.getKey(), entry.getValue());
+            }
+        }
+        Properties producerFallbackProperties =
+                kinesisProducerOptionsMapper.getValidatedConfigurations();
+        for (Map.Entry<Object, Object> entry : producerFallbackProperties.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                properties.put(entry.getKey(), entry.getValue());
+            }
+        }
+
+        properties.put(KINESIS_CLIENT_PROPERTIES_KEY, kinesisClientProps);
+        properties.put(SINK_PARTITIONER.key(), this.partitioner);
+
+        if (tableOptions.getOptional(SINK_FAIL_ON_ERROR).isPresent()) {
+            properties.put(
+                    SINK_FAIL_ON_ERROR.key(), tableOptions.getOptional(SINK_FAIL_ON_ERROR).get());
+        }
+        if (!awsProps.containsKey(AWSConfigConstants.AWS_REGION)) {
+            // per requirement in Amazon Kinesis DataStream
+            throw new IllegalArgumentException(
+                    String.format(
+                            "For FlinkKinesisSink AWS region ('%s') must be set in the config.",
+                            AWSConfigConstants.AWS_REGION));
+        }

Review comment:
       Are you sure? How about if user has defined an `ENDPOINT_URL`? Is region still required?

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDataStreamsConnectorOptionsUtils.java
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.table.util.AWSOptionUtils;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+import org.apache.flink.connector.base.table.sink.options.AsyncSinkConfigurationValidator;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.connector.kinesis.table.util.KinesisClientOptionsUtils;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/**
+ * Class for handling kinesis table options, including key mapping and validations and property
+ * extraction. Class uses options decorators {@link AWSOptionUtils}, {@link
+ * KinesisClientOptionsUtils} for handling each specified set of options.
+ */
+public class KinesisDataStreamsConnectorOptionsUtils extends AsyncSinkConfigurationValidator {
+    private static final Logger LOG =
+            LoggerFactory.getLogger(KinesisDataStreamsConnectorOptionsUtils.class);
+
+    public static final String KINESIS_CLIENT_PROPERTIES_KEY = "sink.client.properties";
+
+    private final AWSOptionUtils awsOptionUtils;
+    private final KinesisClientOptionsUtils kinesisClientOptionsUtils;
+    private final KinesisProducerOptionsMapper kinesisProducerOptionsMapper;
+    private final Map<String, String> resolvedOptions;
+    private final ReadableConfig tableOptions;
+    private final KinesisDataStreamsSinkElementConverter.PartitionKeyGenerator<RowData> partitioner;
+
+    /**
+     * Prefixes of properties that are validated by downstream components and should not be
+     * validated by the Table API infrastructure.
+     */
+    private static final String[] NON_VALIDATED_PREFIXES =
+            new String[] {
+                AWSOptionUtils.AWS_PROPERTIES_PREFIX,
+                KinesisClientOptionsUtils.SINK_CLIENT_PREFIX,
+                KinesisProducerOptionsMapper.KINESIS_PRODUCER_PREFIX
+            };
+
+    protected static final Set<String> TABLE_LEVEL_OPTIONS =
+            new HashSet<>(
+                    Arrays.asList(
+                            STREAM.key(),
+                            FORMAT.key(),
+                            SINK_PARTITIONER.key(),
+                            SINK_FAIL_ON_ERROR.key(),
+                            SINK_PARTITIONER_FIELD_DELIMITER.key(),
+                            FLUSH_BUFFER_SIZE.key(),
+                            FLUSH_BUFFER_TIMEOUT.key(),
+                            MAX_BATCH_SIZE.key(),
+                            MAX_BUFFERED_REQUESTS.key(),
+                            MAX_IN_FLIGHT_REQUESTS.key()));
+
+    public KinesisDataStreamsConnectorOptionsUtils(
+            Map<String, String> options,
+            ReadableConfig tableOptions,
+            RowType physicalType,
+            List<String> partitionKeys,
+            ClassLoader classLoader) {
+        super(tableOptions);
+        this.resolvedOptions = filterTableOptions(options);
+        this.tableOptions = tableOptions;
+        this.awsOptionUtils = new AWSOptionUtils(resolvedOptions);
+        this.kinesisClientOptionsUtils = new KinesisClientOptionsUtils(resolvedOptions);
+        this.kinesisProducerOptionsMapper = new KinesisProducerOptionsMapper(resolvedOptions);
+        this.partitioner =
+                KinesisPartitionKeyGeneratorFactory.getKinesisPartitioner(
+                        tableOptions, physicalType, partitionKeys, classLoader);
+    }
+
+    public Properties getValidatedSinkConfigurations() {
+        Properties properties = super.getValidatedConfigurations();
+        properties.put(STREAM.key(), tableOptions.get(STREAM));
+        Properties awsProps = awsOptionUtils.getValidatedConfigurations();
+        Properties kinesisClientProps = kinesisClientOptionsUtils.getValidatedConfigurations();
+
+        for (Map.Entry<Object, Object> entry : awsProps.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                kinesisClientProps.put(entry.getKey(), entry.getValue());
+            }
+        }
+        Properties producerFallbackProperties =
+                kinesisProducerOptionsMapper.getValidatedConfigurations();
+        for (Map.Entry<Object, Object> entry : producerFallbackProperties.entrySet()) {

Review comment:
       Same as above

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDynamicTableSinkFactory.java
##########
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.api.common.serialization.SerializationSchema;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.base.table.AsyncDynamicTableSinkFactory;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.catalog.CatalogTable;
+import org.apache.flink.table.catalog.ResolvedCatalogTable;
+import org.apache.flink.table.connector.format.EncodingFormat;
+import org.apache.flink.table.connector.sink.DynamicTableSink;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.factories.FactoryUtil;
+import org.apache.flink.table.factories.SerializationFormatFactory;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.HashSet;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.connector.kinesis.table.KinesisDataStreamsConnectorOptionsUtils.KINESIS_CLIENT_PROPERTIES_KEY;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/** Factory for creating {@link KinesisDynamicSink}. */
+@Internal
+public class KinesisDynamicTableSinkFactory extends AsyncDynamicTableSinkFactory {
+    public static final String IDENTIFIER = "kinesis";
+
+    @Override
+    public DynamicTableSink createDynamicTableSink(Context context) {
+
+        FactoryUtil.TableFactoryHelper helper = FactoryUtil.createTableFactoryHelper(this, context);
+        ReadableConfig tableOptions = helper.getOptions();
+        ResolvedCatalogTable catalogTable = context.getCatalogTable();
+        DataType physicalDataType = catalogTable.getResolvedSchema().toPhysicalRowDataType();
+
+        // initialize the table format early in order to register its consumedOptionKeys
+        // in the TableFactoryHelper, as those are needed for correct option validation
+        EncodingFormat<SerializationSchema<RowData>> encodingFormat =
+                helper.discoverEncodingFormat(SerializationFormatFactory.class, FORMAT);
+
+        KinesisDataStreamsConnectorOptionsUtils optionsUtils =
+                new KinesisDataStreamsConnectorOptionsUtils(
+                        catalogTable.getOptions(),
+                        tableOptions,
+                        (RowType) physicalDataType.getLogicalType(),
+                        catalogTable.getPartitionKeys(),
+                        context.getClassLoader());
+        // validate the data types of the table options
+        helper.validateExcept(optionsUtils.getNonValidatedPrefixes().toArray(new String[0]));
+
+        return createDynamicTableSink(
+                tableOptions, catalogTable, physicalDataType, encodingFormat, optionsUtils);
+    }
+
+    @Override
+    public String factoryIdentifier() {
+        return IDENTIFIER;
+    }
+
+    @Override
+    public Set<ConfigOption<?>> requiredOptions() {
+        final Set<ConfigOption<?>> options = new HashSet<>();
+        options.add(STREAM);

Review comment:
       I thought region was required from above? 

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDataStreamsConnectorOptionsUtils.java
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.table.util.AWSOptionUtils;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+import org.apache.flink.connector.base.table.sink.options.AsyncSinkConfigurationValidator;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.connector.kinesis.table.util.KinesisClientOptionsUtils;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/**
+ * Class for handling kinesis table options, including key mapping and validations and property
+ * extraction. Class uses options decorators {@link AWSOptionUtils}, {@link
+ * KinesisClientOptionsUtils} for handling each specified set of options.
+ */
+public class KinesisDataStreamsConnectorOptionsUtils extends AsyncSinkConfigurationValidator {
+    private static final Logger LOG =
+            LoggerFactory.getLogger(KinesisDataStreamsConnectorOptionsUtils.class);
+
+    public static final String KINESIS_CLIENT_PROPERTIES_KEY = "sink.client.properties";
+
+    private final AWSOptionUtils awsOptionUtils;
+    private final KinesisClientOptionsUtils kinesisClientOptionsUtils;
+    private final KinesisProducerOptionsMapper kinesisProducerOptionsMapper;
+    private final Map<String, String> resolvedOptions;
+    private final ReadableConfig tableOptions;
+    private final KinesisDataStreamsSinkElementConverter.PartitionKeyGenerator<RowData> partitioner;
+
+    /**
+     * Prefixes of properties that are validated by downstream components and should not be
+     * validated by the Table API infrastructure.
+     */
+    private static final String[] NON_VALIDATED_PREFIXES =
+            new String[] {
+                AWSOptionUtils.AWS_PROPERTIES_PREFIX,
+                KinesisClientOptionsUtils.SINK_CLIENT_PREFIX,
+                KinesisProducerOptionsMapper.KINESIS_PRODUCER_PREFIX
+            };
+
+    protected static final Set<String> TABLE_LEVEL_OPTIONS =
+            new HashSet<>(
+                    Arrays.asList(
+                            STREAM.key(),
+                            FORMAT.key(),
+                            SINK_PARTITIONER.key(),
+                            SINK_FAIL_ON_ERROR.key(),
+                            SINK_PARTITIONER_FIELD_DELIMITER.key(),
+                            FLUSH_BUFFER_SIZE.key(),
+                            FLUSH_BUFFER_TIMEOUT.key(),
+                            MAX_BATCH_SIZE.key(),
+                            MAX_BUFFERED_REQUESTS.key(),
+                            MAX_IN_FLIGHT_REQUESTS.key()));
+
+    public KinesisDataStreamsConnectorOptionsUtils(
+            Map<String, String> options,
+            ReadableConfig tableOptions,
+            RowType physicalType,
+            List<String> partitionKeys,
+            ClassLoader classLoader) {
+        super(tableOptions);
+        this.resolvedOptions = filterTableOptions(options);
+        this.tableOptions = tableOptions;
+        this.awsOptionUtils = new AWSOptionUtils(resolvedOptions);
+        this.kinesisClientOptionsUtils = new KinesisClientOptionsUtils(resolvedOptions);
+        this.kinesisProducerOptionsMapper = new KinesisProducerOptionsMapper(resolvedOptions);
+        this.partitioner =
+                KinesisPartitionKeyGeneratorFactory.getKinesisPartitioner(
+                        tableOptions, physicalType, partitionKeys, classLoader);
+    }
+
+    public Properties getValidatedSinkConfigurations() {
+        Properties properties = super.getValidatedConfigurations();
+        properties.put(STREAM.key(), tableOptions.get(STREAM));
+        Properties awsProps = awsOptionUtils.getValidatedConfigurations();
+        Properties kinesisClientProps = kinesisClientOptionsUtils.getValidatedConfigurations();
+
+        for (Map.Entry<Object, Object> entry : awsProps.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                kinesisClientProps.put(entry.getKey(), entry.getValue());
+            }
+        }
+        Properties producerFallbackProperties =
+                kinesisProducerOptionsMapper.getValidatedConfigurations();
+        for (Map.Entry<Object, Object> entry : producerFallbackProperties.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                properties.put(entry.getKey(), entry.getValue());
+            }
+        }
+
+        properties.put(KINESIS_CLIENT_PROPERTIES_KEY, kinesisClientProps);
+        properties.put(SINK_PARTITIONER.key(), this.partitioner);
+
+        if (tableOptions.getOptional(SINK_FAIL_ON_ERROR).isPresent()) {
+            properties.put(
+                    SINK_FAIL_ON_ERROR.key(), tableOptions.getOptional(SINK_FAIL_ON_ERROR).get());
+        }
+        if (!awsProps.containsKey(AWSConfigConstants.AWS_REGION)) {
+            // per requirement in Amazon Kinesis DataStream
+            throw new IllegalArgumentException(
+                    String.format(
+                            "For FlinkKinesisSink AWS region ('%s') must be set in the config.",
+                            AWSConfigConstants.AWS_REGION));
+        }
+        return properties;
+    }
+
+    public List<String> getNonValidatedPrefixes() {
+        return Arrays.asList(NON_VALIDATED_PREFIXES);
+    }
+
+    public static Map<String, String> filterTableOptions(Map<String, String> options) {
+        Map<String, String> resolvedOptions = new HashMap<>();
+        // filtering out Table level options as they are handled by factory utils.
+        options.entrySet().stream()
+                .filter(entry -> !TABLE_LEVEL_OPTIONS.contains(entry.getKey()))
+                .forEach(entry -> resolvedOptions.put(entry.getKey(), entry.getValue()));
+        return resolvedOptions;
+    }
+
+    /** Class for Mapping and validation of deprecated producer options. */
+    @Internal
+    public static class KinesisProducerOptionsMapper
+            implements TableOptionsUtils, ConfigurationValidator {
+        private static final String KINESIS_PRODUCER_PREFIX = "sink.producer.";
+        private static final Map<String, String> kinesisProducerFallbackKeys = new HashMap<>();
+        private static final Set<String> kinesisProducerSkipKeys = new HashSet<>();
+        private static final String KINESIS_PRODUCER_ENDPOINT = "sink.producer.kinesis-endpoint";
+        private static final String KINESIS_PRODUCER_PORT = "sink.producer.kinesis-port";
+        private static final String KINESIS_PRODUCER_AGGREGATION =
+                "sink.producer.aggregation-enabled";
+        private static final String KINESIS_PRODUCER_VERIFY_CERTIFICATE =
+                "sink.producer.verify-certificate";
+
+        static {
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.record-max-buffered-time", FLUSH_BUFFER_TIMEOUT.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.collection-max-size", MAX_BATCH_SIZE.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.collection-max-count", MAX_IN_FLIGHT_REQUESTS.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.fail-on-error", SINK_FAIL_ON_ERROR.key());
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_ENDPOINT);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_PORT);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_AGGREGATION);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_VERIFY_CERTIFICATE);
+        }
+
+        private final Map<String, String> resolvedOptions;
+
+        public KinesisProducerOptionsMapper(Map<String, String> resolvedOptions) {
+            this.resolvedOptions = resolvedOptions;
+        }
+
+        @Override
+        public Properties getValidatedConfigurations() {
+            Properties properties = new Properties();
+            properties.putAll(getProcessedResolvedOptions());
+
+            Optional.ofNullable(properties.getProperty(FLUSH_BUFFER_TIMEOUT.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveLongProperty(
+                                        properties,
+                                        FLUSH_BUFFER_TIMEOUT.key(),
+                                        "Invalid option flush buffer size. Must be a positive integer");
+                                properties.put(FLUSH_BUFFER_TIMEOUT.key(), Long.parseLong(key));
+                            });
+
+            Optional.ofNullable(properties.getProperty(MAX_BATCH_SIZE.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveIntProperty(
+                                        properties,
+                                        MAX_BATCH_SIZE.key(),
+                                        "Invalid option batch size. Must be a positive integer");
+                                properties.put(MAX_BATCH_SIZE.key(), Integer.parseInt(key));
+                            });
+
+            Optional.ofNullable(properties.getProperty(MAX_IN_FLIGHT_REQUESTS.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveIntProperty(
+                                        properties,
+                                        MAX_IN_FLIGHT_REQUESTS.key(),
+                                        "Invalid option maximum inflight requests. Must be a positive integer");
+                                properties.put(MAX_IN_FLIGHT_REQUESTS.key(), Integer.parseInt(key));
+                            });

Review comment:
       These are common to Async Sink? Can they be somewhere to be reused by Firehose etc?

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/util/KinesisClientOptionsUtils.java
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table.util;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+
+import software.amazon.awssdk.http.Protocol;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/** Class for handling Kinesis async client specific options. */

Review comment:
       If this is true, can you rename the class to `KinesisAsyncClientOptionsUtils` ?

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/util/KinesisClientOptionsUtils.java
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table.util;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+
+import software.amazon.awssdk.http.Protocol;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/** Class for handling Kinesis async client specific options. */
+@PublicEvolving
+public class KinesisClientOptionsUtils implements TableOptionsUtils, ConfigurationValidator {
+
+    private static final String CLIENT_MAX_CONCURRENCY_OPTION = "max-concurrency";
+    private static final String CLIENT_MAX_TIMEOUT_OPTION = "read-timeout";
+    private static final String CLIENT_HTTP_PROTOCOL_VERSION_OPTION = "protocol.version";
+
+    private final Map<String, String> resolvedOptions;
+
+    public KinesisClientOptionsUtils(Map<String, String> resolvedOptions) {
+        this.resolvedOptions = resolvedOptions;
+    }
+
+    /** Prefix for properties defined in {@link AWSConfigConstants}. */
+    public static final String SINK_CLIENT_PREFIX = "sink.http-client.";
+
+    @Override
+    public Map<String, String> getProcessedResolvedOptions() {
+        Map<String, String> mappedResolvedOptions = new HashMap<>();
+        for (String key : resolvedOptions.keySet()) {
+            if (key.startsWith(SINK_CLIENT_PREFIX)) {
+                mappedResolvedOptions.put(translateClientKeys(key), resolvedOptions.get(key));
+            }
+        }
+        return mappedResolvedOptions;
+    }
+
+    @Override
+    public List<String> getNonValidatedPrefixes() {
+        return Collections.singletonList(SINK_CLIENT_PREFIX);
+    }
+
+    @Override
+    public Properties getValidatedConfigurations() {
+        Properties clientConfigurations = new Properties();
+        Map<String, String> mappedProperties = getProcessedResolvedOptions();
+        for (Map.Entry<String, String> entry : mappedProperties.entrySet()) {
+            clientConfigurations.setProperty(entry.getKey(), entry.getValue());
+        }

Review comment:
       nit: 
   
   ```
           Map<String, String> mappedProperties = getProcessedResolvedOptions();
           for (Map.Entry<String, String> entry : mappedProperties.entrySet()) {
               clientConfigurations.setProperty(entry.getKey(), entry.getValue());
           }
   ```
   
   can be 
   
   ```
   clientConfigurations.putAll(getProcessedResolvedOptions());
   ```

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDataStreamsConnectorOptionsUtils.java
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.aws.table.util.AWSOptionUtils;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+import org.apache.flink.connector.base.table.sink.options.AsyncSinkConfigurationValidator;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.connector.kinesis.table.util.KinesisClientOptionsUtils;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/**
+ * Class for handling kinesis table options, including key mapping and validations and property
+ * extraction. Class uses options decorators {@link AWSOptionUtils}, {@link
+ * KinesisClientOptionsUtils} for handling each specified set of options.
+ */
+public class KinesisDataStreamsConnectorOptionsUtils extends AsyncSinkConfigurationValidator {
+    private static final Logger LOG =
+            LoggerFactory.getLogger(KinesisDataStreamsConnectorOptionsUtils.class);
+
+    public static final String KINESIS_CLIENT_PROPERTIES_KEY = "sink.client.properties";
+
+    private final AWSOptionUtils awsOptionUtils;
+    private final KinesisClientOptionsUtils kinesisClientOptionsUtils;
+    private final KinesisProducerOptionsMapper kinesisProducerOptionsMapper;
+    private final Map<String, String> resolvedOptions;
+    private final ReadableConfig tableOptions;
+    private final KinesisDataStreamsSinkElementConverter.PartitionKeyGenerator<RowData> partitioner;
+
+    /**
+     * Prefixes of properties that are validated by downstream components and should not be
+     * validated by the Table API infrastructure.
+     */
+    private static final String[] NON_VALIDATED_PREFIXES =
+            new String[] {
+                AWSOptionUtils.AWS_PROPERTIES_PREFIX,
+                KinesisClientOptionsUtils.SINK_CLIENT_PREFIX,
+                KinesisProducerOptionsMapper.KINESIS_PRODUCER_PREFIX
+            };
+
+    protected static final Set<String> TABLE_LEVEL_OPTIONS =
+            new HashSet<>(
+                    Arrays.asList(
+                            STREAM.key(),
+                            FORMAT.key(),
+                            SINK_PARTITIONER.key(),
+                            SINK_FAIL_ON_ERROR.key(),
+                            SINK_PARTITIONER_FIELD_DELIMITER.key(),
+                            FLUSH_BUFFER_SIZE.key(),
+                            FLUSH_BUFFER_TIMEOUT.key(),
+                            MAX_BATCH_SIZE.key(),
+                            MAX_BUFFERED_REQUESTS.key(),
+                            MAX_IN_FLIGHT_REQUESTS.key()));
+
+    public KinesisDataStreamsConnectorOptionsUtils(
+            Map<String, String> options,
+            ReadableConfig tableOptions,
+            RowType physicalType,
+            List<String> partitionKeys,
+            ClassLoader classLoader) {
+        super(tableOptions);
+        this.resolvedOptions = filterTableOptions(options);
+        this.tableOptions = tableOptions;
+        this.awsOptionUtils = new AWSOptionUtils(resolvedOptions);
+        this.kinesisClientOptionsUtils = new KinesisClientOptionsUtils(resolvedOptions);
+        this.kinesisProducerOptionsMapper = new KinesisProducerOptionsMapper(resolvedOptions);
+        this.partitioner =
+                KinesisPartitionKeyGeneratorFactory.getKinesisPartitioner(
+                        tableOptions, physicalType, partitionKeys, classLoader);
+    }
+
+    public Properties getValidatedSinkConfigurations() {
+        Properties properties = super.getValidatedConfigurations();
+        properties.put(STREAM.key(), tableOptions.get(STREAM));
+        Properties awsProps = awsOptionUtils.getValidatedConfigurations();
+        Properties kinesisClientProps = kinesisClientOptionsUtils.getValidatedConfigurations();
+
+        for (Map.Entry<Object, Object> entry : awsProps.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                kinesisClientProps.put(entry.getKey(), entry.getValue());
+            }
+        }
+        Properties producerFallbackProperties =
+                kinesisProducerOptionsMapper.getValidatedConfigurations();
+        for (Map.Entry<Object, Object> entry : producerFallbackProperties.entrySet()) {
+            if (!properties.containsKey(entry.getKey())) {
+                properties.put(entry.getKey(), entry.getValue());
+            }
+        }
+
+        properties.put(KINESIS_CLIENT_PROPERTIES_KEY, kinesisClientProps);
+        properties.put(SINK_PARTITIONER.key(), this.partitioner);
+
+        if (tableOptions.getOptional(SINK_FAIL_ON_ERROR).isPresent()) {
+            properties.put(
+                    SINK_FAIL_ON_ERROR.key(), tableOptions.getOptional(SINK_FAIL_ON_ERROR).get());
+        }
+        if (!awsProps.containsKey(AWSConfigConstants.AWS_REGION)) {
+            // per requirement in Amazon Kinesis DataStream
+            throw new IllegalArgumentException(
+                    String.format(
+                            "For FlinkKinesisSink AWS region ('%s') must be set in the config.",
+                            AWSConfigConstants.AWS_REGION));
+        }
+        return properties;
+    }
+
+    public List<String> getNonValidatedPrefixes() {
+        return Arrays.asList(NON_VALIDATED_PREFIXES);
+    }
+
+    public static Map<String, String> filterTableOptions(Map<String, String> options) {
+        Map<String, String> resolvedOptions = new HashMap<>();
+        // filtering out Table level options as they are handled by factory utils.
+        options.entrySet().stream()
+                .filter(entry -> !TABLE_LEVEL_OPTIONS.contains(entry.getKey()))
+                .forEach(entry -> resolvedOptions.put(entry.getKey(), entry.getValue()));
+        return resolvedOptions;
+    }
+
+    /** Class for Mapping and validation of deprecated producer options. */
+    @Internal
+    public static class KinesisProducerOptionsMapper
+            implements TableOptionsUtils, ConfigurationValidator {
+        private static final String KINESIS_PRODUCER_PREFIX = "sink.producer.";
+        private static final Map<String, String> kinesisProducerFallbackKeys = new HashMap<>();
+        private static final Set<String> kinesisProducerSkipKeys = new HashSet<>();
+        private static final String KINESIS_PRODUCER_ENDPOINT = "sink.producer.kinesis-endpoint";
+        private static final String KINESIS_PRODUCER_PORT = "sink.producer.kinesis-port";
+        private static final String KINESIS_PRODUCER_AGGREGATION =
+                "sink.producer.aggregation-enabled";
+        private static final String KINESIS_PRODUCER_VERIFY_CERTIFICATE =
+                "sink.producer.verify-certificate";
+
+        static {
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.record-max-buffered-time", FLUSH_BUFFER_TIMEOUT.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.collection-max-size", MAX_BATCH_SIZE.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.collection-max-count", MAX_IN_FLIGHT_REQUESTS.key());
+            kinesisProducerFallbackKeys.put(
+                    "sink.producer.fail-on-error", SINK_FAIL_ON_ERROR.key());
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_ENDPOINT);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_PORT);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_AGGREGATION);
+            kinesisProducerSkipKeys.add(KINESIS_PRODUCER_VERIFY_CERTIFICATE);
+        }
+
+        private final Map<String, String> resolvedOptions;
+
+        public KinesisProducerOptionsMapper(Map<String, String> resolvedOptions) {
+            this.resolvedOptions = resolvedOptions;
+        }
+
+        @Override
+        public Properties getValidatedConfigurations() {
+            Properties properties = new Properties();
+            properties.putAll(getProcessedResolvedOptions());
+
+            Optional.ofNullable(properties.getProperty(FLUSH_BUFFER_TIMEOUT.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveLongProperty(
+                                        properties,
+                                        FLUSH_BUFFER_TIMEOUT.key(),
+                                        "Invalid option flush buffer size. Must be a positive integer");
+                                properties.put(FLUSH_BUFFER_TIMEOUT.key(), Long.parseLong(key));
+                            });
+
+            Optional.ofNullable(properties.getProperty(MAX_BATCH_SIZE.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveIntProperty(
+                                        properties,
+                                        MAX_BATCH_SIZE.key(),
+                                        "Invalid option batch size. Must be a positive integer");
+                                properties.put(MAX_BATCH_SIZE.key(), Integer.parseInt(key));
+                            });
+
+            Optional.ofNullable(properties.getProperty(MAX_IN_FLIGHT_REQUESTS.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalPositiveIntProperty(
+                                        properties,
+                                        MAX_IN_FLIGHT_REQUESTS.key(),
+                                        "Invalid option maximum inflight requests. Must be a positive integer");
+                                properties.put(MAX_IN_FLIGHT_REQUESTS.key(), Integer.parseInt(key));
+                            });
+
+            Optional.ofNullable(properties.getProperty(SINK_FAIL_ON_ERROR.key()))
+                    .ifPresent(
+                            key -> {
+                                ConfigurationValidator.validateOptionalBooleanProperty(
+                                        properties,
+                                        SINK_FAIL_ON_ERROR.key(),
+                                        "Invalid option fail on error. Must be a boolean");
+                                properties.put(SINK_FAIL_ON_ERROR.key(), Boolean.parseBoolean(key));
+                            });
+
+            return properties;
+        }
+
+        @Override
+        public Map<String, String> getProcessedResolvedOptions() {
+            Map<String, String> processedResolvedOptions = new HashMap<>();
+            for (String key : resolvedOptions.keySet()) {
+                if (key.startsWith(KINESIS_PRODUCER_PREFIX)) {
+                    Optional.ofNullable(kinesisProducerFallbackKeys.get(key))
+                            .ifPresent(
+                                    mappedKey ->
+                                            processedResolvedOptions.put(
+                                                    mappedKey, resolvedOptions.get(key)));
+                    if (!kinesisProducerFallbackKeys.containsKey(key)
+                            && !kinesisProducerSkipKeys.contains(key)) {
+                        LOG.warn(
+                                String.format(
+                                        "Key %s is unsupported by Kinesis Datastream Sink", key));
+                    }
+                }
+            }
+
+            // reconstructing end-point from legacy end-point and port
+            if (resolvedOptions.containsKey(KINESIS_PRODUCER_ENDPOINT)) {
+                if (resolvedOptions.containsKey(KINESIS_PRODUCER_PORT)) {
+                    processedResolvedOptions.putIfAbsent(
+                            AWSConfigConstants.AWS_ENDPOINT,
+                            String.format(
+                                    "https://%s:%s",
+                                    resolvedOptions.get(KINESIS_PRODUCER_ENDPOINT),
+                                    resolvedOptions.get(KINESIS_PRODUCER_PORT)));
+                } else {
+                    processedResolvedOptions.putIfAbsent(
+                            AWSConfigConstants.AWS_ENDPOINT,
+                            String.format(
+                                    "https://%s", resolvedOptions.get(KINESIS_PRODUCER_ENDPOINT)));
+                }
+            }

Review comment:
       Hardcoding `https` means it will not work with Kinesalite? I thought we currently support `http`, please confirm.

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/KinesisDynamicTableSinkFactory.java
##########
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.api.common.serialization.SerializationSchema;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.base.table.AsyncDynamicTableSinkFactory;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSinkElementConverter;
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.catalog.CatalogTable;
+import org.apache.flink.table.catalog.ResolvedCatalogTable;
+import org.apache.flink.table.connector.format.EncodingFormat;
+import org.apache.flink.table.connector.sink.DynamicTableSink;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.factories.FactoryUtil;
+import org.apache.flink.table.factories.SerializationFormatFactory;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.HashSet;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.FLUSH_BUFFER_TIMEOUT;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BATCH_SIZE;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_BUFFERED_REQUESTS;
+import static org.apache.flink.connector.base.table.AsyncSinkConnectorOptions.MAX_IN_FLIGHT_REQUESTS;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_FAIL_ON_ERROR;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.SINK_PARTITIONER_FIELD_DELIMITER;
+import static org.apache.flink.connector.kinesis.table.KinesisConnectorOptions.STREAM;
+import static org.apache.flink.connector.kinesis.table.KinesisDataStreamsConnectorOptionsUtils.KINESIS_CLIENT_PROPERTIES_KEY;
+import static org.apache.flink.table.factories.FactoryUtil.FORMAT;
+
+/** Factory for creating {@link KinesisDynamicSink}. */
+@Internal
+public class KinesisDynamicTableSinkFactory extends AsyncDynamicTableSinkFactory {
+    public static final String IDENTIFIER = "kinesis";
+
+    @Override
+    public DynamicTableSink createDynamicTableSink(Context context) {
+
+        FactoryUtil.TableFactoryHelper helper = FactoryUtil.createTableFactoryHelper(this, context);
+        ReadableConfig tableOptions = helper.getOptions();
+        ResolvedCatalogTable catalogTable = context.getCatalogTable();
+        DataType physicalDataType = catalogTable.getResolvedSchema().toPhysicalRowDataType();
+
+        // initialize the table format early in order to register its consumedOptionKeys
+        // in the TableFactoryHelper, as those are needed for correct option validation
+        EncodingFormat<SerializationSchema<RowData>> encodingFormat =
+                helper.discoverEncodingFormat(SerializationFormatFactory.class, FORMAT);
+
+        KinesisDataStreamsConnectorOptionsUtils optionsUtils =
+                new KinesisDataStreamsConnectorOptionsUtils(
+                        catalogTable.getOptions(),
+                        tableOptions,
+                        (RowType) physicalDataType.getLogicalType(),
+                        catalogTable.getPartitionKeys(),
+                        context.getClassLoader());
+        // validate the data types of the table options
+        helper.validateExcept(optionsUtils.getNonValidatedPrefixes().toArray(new String[0]));
+
+        return createDynamicTableSink(
+                tableOptions, catalogTable, physicalDataType, encodingFormat, optionsUtils);
+    }
+
+    @Override
+    public String factoryIdentifier() {
+        return IDENTIFIER;
+    }
+
+    @Override
+    public Set<ConfigOption<?>> requiredOptions() {
+        final Set<ConfigOption<?>> options = new HashSet<>();
+        options.add(STREAM);
+        options.add(FORMAT);
+        return options;
+    }
+
+    @Override
+    public Set<ConfigOption<?>> optionalOptions() {
+        final Set<ConfigOption<?>> options = super.optionalOptions();
+        options.add(SINK_PARTITIONER);
+        options.add(SINK_PARTITIONER_FIELD_DELIMITER);
+        options.add(SINK_FAIL_ON_ERROR);
+        return options;
+    }
+
+    public KinesisDynamicSink createDynamicTableSink(
+            ReadableConfig tableOptions,
+            ResolvedCatalogTable catalogTable,
+            DataType physicalDataType,
+            EncodingFormat<SerializationSchema<RowData>> encodingFormat,
+            KinesisDataStreamsConnectorOptionsUtils optionsUtils) {
+
+        // Validate option values
+        validateKinesisPartitioner(tableOptions, catalogTable);
+        Properties properties = optionsUtils.getValidatedSinkConfigurations();
+
+        KinesisDynamicSink.KinesisDynamicTableSinkBuilder builder =
+                new KinesisDynamicSink.KinesisDynamicTableSinkBuilder();
+
+        builder.setStream((String) properties.get(STREAM.key()))
+                .setKinesisClientProperties(
+                        (Properties) properties.get(KINESIS_CLIENT_PROPERTIES_KEY))
+                .setEncodingFormat(encodingFormat)
+                .setConsumedDataType(physicalDataType)
+                .setPartitioner(
+                        (KinesisDataStreamsSinkElementConverter.PartitionKeyGenerator<RowData>)
+                                properties.get(SINK_PARTITIONER.key()));
+
+        Optional.ofNullable((Long) properties.get(FLUSH_BUFFER_SIZE.key()))
+                .ifPresent(builder::setMaxBufferSizeInBytes);
+        Optional.ofNullable((Long) properties.get(FLUSH_BUFFER_TIMEOUT.key()))
+                .ifPresent(builder::setMaxTimeInBufferMS);
+        Optional.ofNullable((Integer) properties.get(MAX_BATCH_SIZE.key()))
+                .ifPresent(builder::setMaxBatchSize);
+        Optional.ofNullable((Integer) properties.get(MAX_BUFFERED_REQUESTS.key()))
+                .ifPresent(builder::setMaxBufferedRequests);
+        Optional.ofNullable((Integer) properties.get(MAX_IN_FLIGHT_REQUESTS.key()))
+                .ifPresent(builder::setMaxInFlightRequests);
+        Optional.ofNullable((Boolean) properties.get(SINK_FAIL_ON_ERROR.key()))
+                .ifPresent(builder::setFailOnError);

Review comment:
       This could be done in a `super` method?

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/AsyncDynamicTableSinkFactory.java
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.table.factories.DynamicTableSinkFactory;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Abstract Implementation of {@link DynamicTableSinkFactory} having {@link
+ * org.apache.flink.connector.base.sink.AsyncSinkBase} fields as optional table options defined in
+ * {@link AsyncSinkConnectorOptions}.
+ */
+@PublicEvolving
+public abstract class AsyncDynamicTableSinkFactory implements DynamicTableSinkFactory {
+
+    @Override
+    public Set<ConfigOption<?>> optionalOptions() {
+

Review comment:
       nit: delete new line

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/AsyncSinkConnectorOptions.java
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+
+/**
+ * Optional Options for {@link AsyncDynamicTableSinkFactory} representing fields of {@link
+ * org.apache.flink.connector.base.sink.AsyncSinkBase}.
+ */
+@PublicEvolving
+public class AsyncSinkConnectorOptions {
+
+    public static final ConfigOption<Integer> MAX_BATCH_SIZE =
+            ConfigOptions.key("sink.batch.max-size")
+                    .intType()
+                    .noDefaultValue()
+                    .withDescription(
+                            "Maximum number of elements that may be passed"
+                                    + " in a list to be written downstream.");
+
+    public static final ConfigOption<Integer> MAX_IN_FLIGHT_REQUESTS =
+            ConfigOptions.key("sink.requests.max-inflight")
+                    .intType()
+                    .noDefaultValue()
+                    .withDescription(
+                            "Request threshold for uncompleted requests before blocking new write requests.");
+
+    public static final ConfigOption<Integer> MAX_BUFFERED_REQUESTS =
+            ConfigOptions.key("sink.requests.max-buffered")
+                    .intType()
+                    .noDefaultValue()
+                    .withDescription("Request buffer threshold for blocking new write requests.");
+
+    public static final ConfigOption<Long> FLUSH_BUFFER_SIZE =
+            ConfigOptions.key("sink.flush-buffer.size")
+                    .longType()
+                    .noDefaultValue()
+                    .withDescription("Threshold value in bytes for writer buffer flushing.");
+
+    public static final ConfigOption<Long> FLUSH_BUFFER_TIMEOUT =
+            ConfigOptions.key("sink.flush-buffer.timeout")
+                    .longType()
+                    .noDefaultValue()
+                    .withDescription(
+                            "Threshold time for an element to be in a buffer before being flushed.");

Review comment:
       Add unit, is this milliseconds or seconds or years?

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/test/java/org/apache/flink/connector/kinesis/table/KinesisDynamicTableSinkFactoryTest.java
##########
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table;
+
+import org.apache.flink.api.connector.sink.Sink;
+import org.apache.flink.connector.kinesis.sink.KinesisDataStreamsSink;
+import org.apache.flink.table.api.DataTypes;
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.catalog.Column;
+import org.apache.flink.table.catalog.ResolvedSchema;
+import org.apache.flink.table.connector.sink.DynamicTableSink;
+import org.apache.flink.table.connector.sink.SinkProvider;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.factories.TableOptionsBuilder;
+import org.apache.flink.table.factories.TestFormatFactory;
+import org.apache.flink.table.runtime.connector.sink.SinkRuntimeProviderContext;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.types.logical.RowType;
+import org.apache.flink.util.TestLogger;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.apache.flink.table.factories.utils.FactoryMocks.createTableSink;
+
+/** Test for {@link KinesisDynamicSink} created by {@link KinesisDynamicTableSinkFactory}. */
+public class KinesisDynamicTableSinkFactoryTest extends TestLogger {
+    private static final String STREAM_NAME = "myStream";
+
+    @Test
+    public void testGoodTableSinkForPartitionedTable() {
+        ResolvedSchema sinkSchema = defaultSinkSchema();
+        DataType physicalDataType = sinkSchema.toPhysicalRowDataType();
+        Map<String, String> sinkOptions = defaultTableOptions().build();
+        List<String> sinkPartitionKeys = Arrays.asList("name", "curr_id");
+
+        // Construct actual DynamicTableSink using FactoryUtil
+        KinesisDynamicSink actualSink =
+                (KinesisDynamicSink) createTableSink(sinkSchema, sinkPartitionKeys, sinkOptions);
+
+        // Construct expected DynamicTableSink using factory under test
+        KinesisDynamicSink expectedSink =
+                (KinesisDynamicSink)
+                        new KinesisDynamicSink.KinesisDynamicTableSinkBuilder()
+                                .setConsumedDataType(physicalDataType)
+                                .setStream(STREAM_NAME)
+                                .setKinesisClientProperties(defaultProducerProperties())
+                                .setEncodingFormat(new TestFormatFactory.EncodingFormatMock(","))
+                                .setPartitioner(
+                                        new RowDataFieldsKinesisKeyGenerator(
+                                                (RowType) physicalDataType.getLogicalType(),
+                                                sinkPartitionKeys))
+                                .build();
+        // verify that the constructed DynamicTableSink is as expected
+        Assertions.assertThat(actualSink).isEqualTo(expectedSink);
+
+        // verify the produced sink
+        DynamicTableSink.SinkRuntimeProvider sinkFunctionProvider =
+                actualSink.getSinkRuntimeProvider(new SinkRuntimeProviderContext(false));
+        Sink<RowData, ?, ?, ?> sinkFunction = ((SinkProvider) sinkFunctionProvider).createSink();
+        Assertions.assertThat(sinkFunction).isInstanceOf(KinesisDataStreamsSink.class);
+    }
+
+    @Test
+    public void testGoodTableSinkCopyForPartitionedTable() {
+        ResolvedSchema sinkSchema = defaultSinkSchema();
+        DataType physicalDataType = sinkSchema.toPhysicalRowDataType();
+        Map<String, String> sinkOptions = defaultTableOptions().build();
+        List<String> sinkPartitionKeys = Arrays.asList("name", "curr_id");
+
+        // Construct actual DynamicTableSink using FactoryUtil
+        KinesisDynamicSink actualSink =
+                (KinesisDynamicSink) createTableSink(sinkSchema, sinkPartitionKeys, sinkOptions);
+
+        // Construct expected DynamicTableSink using factory under test
+        KinesisDynamicSink expectedSink =
+                (KinesisDynamicSink)
+                        new KinesisDynamicSink.KinesisDynamicTableSinkBuilder()
+                                .setConsumedDataType(physicalDataType)
+                                .setStream(STREAM_NAME)
+                                .setKinesisClientProperties(defaultProducerProperties())
+                                .setEncodingFormat(new TestFormatFactory.EncodingFormatMock(","))
+                                .setPartitioner(
+                                        new RowDataFieldsKinesisKeyGenerator(
+                                                (RowType) physicalDataType.getLogicalType(),
+                                                sinkPartitionKeys))
+                                .build();
+        Assertions.assertThat(actualSink).isEqualTo(expectedSink.copy());
+        Assertions.assertThat(expectedSink).isNotSameAs(expectedSink.copy());
+    }
+
+    @Test
+    public void testGoodTableSinkForNonPartitionedTable() {
+        ResolvedSchema sinkSchema = defaultSinkSchema();
+        Map<String, String> sinkOptions = defaultTableOptions().build();
+
+        // Construct actual DynamicTableSink using FactoryUtil
+        KinesisDynamicSink actualSink =
+                (KinesisDynamicSink) createTableSink(sinkSchema, sinkOptions);
+
+        // Construct expected DynamicTableSink using factory under test
+        KinesisDynamicSink expectedSink =
+                (KinesisDynamicSink)
+                        new KinesisDynamicSink.KinesisDynamicTableSinkBuilder()
+                                .setConsumedDataType(sinkSchema.toPhysicalRowDataType())
+                                .setStream(STREAM_NAME)
+                                .setKinesisClientProperties(defaultProducerProperties())
+                                .setEncodingFormat(new TestFormatFactory.EncodingFormatMock(","))
+                                .setPartitioner(new RandomKinesisKeyGenerator<>())
+                                .build();
+
+        Assertions.assertThat(actualSink).isEqualTo(expectedSink);
+
+        // verify the produced sink
+        DynamicTableSink.SinkRuntimeProvider sinkFunctionProvider =
+                actualSink.getSinkRuntimeProvider(new SinkRuntimeProviderContext(false));
+        Sink<RowData, ?, ?, ?> sinkFunction = ((SinkProvider) sinkFunctionProvider).createSink();
+        Assertions.assertThat(sinkFunction).isInstanceOf(KinesisDataStreamsSink.class);
+    }
+
+    @Test
+    public void testGoodTableSinkForNonPartitionedTableWithSinkOptions() {
+        ResolvedSchema sinkSchema = defaultSinkSchema();
+        Map<String, String> sinkOptions = defaultTableOptionsWithSinkOptions().build();
+
+        // Construct actual DynamicTableSink using FactoryUtil
+        KinesisDynamicSink actualSink =
+                (KinesisDynamicSink) createTableSink(sinkSchema, sinkOptions);
+
+        // Construct expected DynamicTableSink using factory under test
+        KinesisDynamicSink expectedSink =
+                (KinesisDynamicSink)
+                        getDefaultSinkBuilder()
+                                .setConsumedDataType(sinkSchema.toPhysicalRowDataType())
+                                .setStream(STREAM_NAME)
+                                .setKinesisClientProperties(defaultProducerProperties())
+                                .setEncodingFormat(new TestFormatFactory.EncodingFormatMock(","))
+                                .setPartitioner(new RandomKinesisKeyGenerator<>())
+                                .build();
+
+        Assertions.assertThat(actualSink).isEqualTo(expectedSink);
+
+        // verify the produced sink
+        DynamicTableSink.SinkRuntimeProvider sinkFunctionProvider =
+                actualSink.getSinkRuntimeProvider(new SinkRuntimeProviderContext(false));
+        Sink<RowData, ?, ?, ?> sinkFunction = ((SinkProvider) sinkFunctionProvider).createSink();
+        Assertions.assertThat(sinkFunction).isInstanceOf(KinesisDataStreamsSink.class);
+    }
+
+    @Test
+    public void testGoodTableSinkForNonPartitionedTableWithProducerOptions() {
+        ResolvedSchema sinkSchema = defaultSinkSchema();
+        Map<String, String> sinkOptions = defaultTableOptionsWithDeprecatedOptions().build();
+
+        // Construct actual DynamicTableSink using FactoryUtil
+        KinesisDynamicSink actualSink =
+                (KinesisDynamicSink) createTableSink(sinkSchema, sinkOptions);
+
+        // Construct expected DynamicTableSink using factory under test
+        KinesisDynamicSink expectedSink =
+                (KinesisDynamicSink)
+                        new KinesisDynamicSink.KinesisDynamicTableSinkBuilder()
+                                .setFailOnError(true)
+                                .setMaxBatchSize(100)
+                                .setMaxInFlightRequests(100)
+                                .setMaxTimeInBufferMS(1000)
+                                .setConsumedDataType(sinkSchema.toPhysicalRowDataType())
+                                .setStream(STREAM_NAME)
+                                .setKinesisClientProperties(defaultProducerProperties())
+                                .setEncodingFormat(new TestFormatFactory.EncodingFormatMock(","))
+                                .setPartitioner(new RandomKinesisKeyGenerator<>())
+                                .build();
+
+        // verify that the constructed DynamicTableSink is as expected
+        Assertions.assertThat(actualSink).isEqualTo(expectedSink);
+
+        // verify the produced sink
+        DynamicTableSink.SinkRuntimeProvider sinkFunctionProvider =
+                actualSink.getSinkRuntimeProvider(new SinkRuntimeProviderContext(false));
+        Sink<RowData, ?, ?, ?> sinkFunction = ((SinkProvider) sinkFunctionProvider).createSink();
+        Assertions.assertThat(sinkFunction).isInstanceOf(KinesisDataStreamsSink.class);
+    }
+
+    @Test
+    public void testBadTableSinkForCustomPartitionerForPartitionedTable() {
+        ResolvedSchema sinkSchema = defaultSinkSchema();
+        Map<String, String> sinkOptions =
+                defaultTableOptions()
+                        .withTableOption(KinesisConnectorOptions.SINK_PARTITIONER, "random")
+                        .build();
+
+        Assertions.assertThatExceptionOfType(ValidationException.class)
+                .isThrownBy(
+                        () ->
+                                createTableSink(
+                                        sinkSchema, Arrays.asList("name", "curr_id"), sinkOptions))
+                .havingCause()
+                .withMessageContaining(
+                        String.format(
+                                "Cannot set %s option for a table defined with a PARTITIONED BY clause",
+                                KinesisConnectorOptions.SINK_PARTITIONER.key()));
+    }
+
+    @Test
+    public void testBadTableSinkForNonExistingPartitionerClass() {
+        ResolvedSchema sinkSchema = defaultSinkSchema();
+        Map<String, String> sinkOptions =
+                defaultTableOptions()
+                        .withTableOption(KinesisConnectorOptions.SINK_PARTITIONER, "abc")
+                        .build();
+
+        Assertions.assertThatExceptionOfType(ValidationException.class)
+                .isThrownBy(() -> createTableSink(sinkSchema, sinkOptions))
+                .havingCause()
+                .withMessageContaining("Could not find and instantiate partitioner class 'abc'");
+    }
+
+    private ResolvedSchema defaultSinkSchema() {
+        return ResolvedSchema.of(
+                Column.physical("name", DataTypes.STRING()),
+                Column.physical("curr_id", DataTypes.BIGINT()),
+                Column.physical("time", DataTypes.TIMESTAMP(3)));
+    }
+
+    private TableOptionsBuilder defaultTableOptionsWithSinkOptions() {
+        return defaultTableOptions()
+                .withTableOption("sink.fail-on-error", "true")

Review comment:
       Do we have constants for these? If not, should we? Might benefit people using Table API

##########
File path: flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/table/util/KinesisClientOptionsUtils.java
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis.table.util;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.connector.aws.config.AWSConfigConstants;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+import org.apache.flink.connector.base.table.options.TableOptionsUtils;
+
+import software.amazon.awssdk.http.Protocol;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/** Class for handling Kinesis async client specific options. */
+@PublicEvolving
+public class KinesisClientOptionsUtils implements TableOptionsUtils, ConfigurationValidator {
+
+    private static final String CLIENT_MAX_CONCURRENCY_OPTION = "max-concurrency";
+    private static final String CLIENT_MAX_TIMEOUT_OPTION = "read-timeout";
+    private static final String CLIENT_HTTP_PROTOCOL_VERSION_OPTION = "protocol.version";
+
+    private final Map<String, String> resolvedOptions;
+
+    public KinesisClientOptionsUtils(Map<String, String> resolvedOptions) {
+        this.resolvedOptions = resolvedOptions;
+    }
+
+    /** Prefix for properties defined in {@link AWSConfigConstants}. */
+    public static final String SINK_CLIENT_PREFIX = "sink.http-client.";

Review comment:
       Move to top of class

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/options/TableOptionsUtils.java
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table.options;
+
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.util.List;
+import java.util.Map;
+
+/** Interface to be implemented by utils handling specific set of options. */
+@PublicEvolving
+public interface TableOptionsUtils {
+
+    Map<String, String> getProcessedResolvedOptions();

Review comment:
       I think a comment would go well here, since I do not understand what a Processed Resolved option is

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/options/ConfigurationValidator.java
##########
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table.options;
+
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Properties;
+
+/**
+ * Interface for classes that validate connector specific table options, including common utils for
+ * validation.
+ */
+@PublicEvolving
+public interface ConfigurationValidator {
+
+    /// Interface
+    Properties getValidatedConfigurations();
+
+    /// Utils

Review comment:
       Did you verify there are no existing alternatives. Surely there must be! I cannot find any though.

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/AsyncSinkConnectorOptions.java
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+
+/**
+ * Optional Options for {@link AsyncDynamicTableSinkFactory} representing fields of {@link
+ * org.apache.flink.connector.base.sink.AsyncSinkBase}.
+ */
+@PublicEvolving
+public class AsyncSinkConnectorOptions {
+
+    public static final ConfigOption<Integer> MAX_BATCH_SIZE =
+            ConfigOptions.key("sink.batch.max-size")
+                    .intType()
+                    .noDefaultValue()
+                    .withDescription(
+                            "Maximum number of elements that may be passed"
+                                    + " in a list to be written downstream.");

Review comment:
       nit: `list` sounds too technical here, maybe say batch instead

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/options/TableOptionsUtils.java
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table.options;
+
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.util.List;
+import java.util.Map;
+
+/** Interface to be implemented by utils handling specific set of options. */

Review comment:
       nit: "Interface to be implemented" is implied by the language ;)

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/sink/AsyncDynamicTableSink.java
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table.sink;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.connector.base.sink.AsyncSinkBase;
+import org.apache.flink.table.connector.sink.DynamicTableSink;
+
+import javax.annotation.Nullable;
+
+import java.util.Objects;
+
+/**
+ * Abstract wrapper class for {@link DynamicTableSink} with attributes of {@link
+ * org.apache.flink.connector.base.sink.AsyncSinkBase}.
+ *
+ * @param <RequestEntryT> Request entry type for {@link AsyncSinkBase}.
+ */
+@PublicEvolving

Review comment:
       Since this is a key class to implement it would be nice to elaborate. At least say "Concrete Async Sink implementations should extend this class to add Table API support" ... 

##########
File path: flink-end-to-end-tests/flink-streaming-kinesis-test/src/test/resources/filter-large-orders.sql
##########
@@ -36,10 +36,10 @@ CREATE TABLE large_orders (
   'connector' = 'kinesis',

Review comment:
       While you are here, can you please add client/secret config due to this?
   
   > I just noticed a strange behaviour running the KinesisTableApiITCase . It always reads the local ~/.aws/config when constructing the KinesisClient through the SDKDefaultClientBuilder. I guess recently the format of this file changed and now the tests started failing on my local machine because of  wrong indentations. Do you know if there is a way to disable this lookup during testing?
   
   > t is probably because the source and sink do not specify any creds and fallback to default. https://github.com/apache/flink/blob/master/flink-end-to-end-tests/flink-streaming-kinesis-test/src/test/resources/filter-large-orders.sql

##########
File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/table/sink/options/AsyncSinkConfigurationValidator.java
##########
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.base.table.sink.options;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.connector.base.table.AsyncSinkConnectorOptions;
+import org.apache.flink.connector.base.table.options.ConfigurationValidator;
+
+import java.util.Properties;
+
+/** Base class for validating options in {@link AsyncSinkConnectorOptions}. */
+@PublicEvolving
+public abstract class AsyncSinkConfigurationValidator implements ConfigurationValidator {
+    protected final ReadableConfig tableOptions;
+
+    public AsyncSinkConfigurationValidator(ReadableConfig tableOptions) {
+        this.tableOptions = tableOptions;
+    }
+
+    @Override
+    public Properties getValidatedConfigurations() {
+        Properties asyncProps = new Properties();
+
+        if (tableOptions.getOptional(AsyncSinkConnectorOptions.MAX_BATCH_SIZE).isPresent()) {
+            if (tableOptions.getOptional(AsyncSinkConnectorOptions.MAX_BATCH_SIZE).get() > 0) {
+                asyncProps.put(
+                        AsyncSinkConnectorOptions.MAX_BATCH_SIZE.key(),
+                        tableOptions.getOptional(AsyncSinkConnectorOptions.MAX_BATCH_SIZE).get());
+            } else {
+                throw new IllegalArgumentException(
+                        "Invalid option batch size. Must be a positive integer");
+            }
+        }

Review comment:
       nit: A log of copy and paste here, might be worth extracting a helper method




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org