Github user tzulitai commented on a diff in the pull request:
https://github.com/apache/flink/pull/4228#discussion_r124967667
--- Diff:
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/KinesisConfigUtil.java
---
@@ -171,7 +172,14 @@ public static void validateAwsConfiguration(Properties
config) {
}
if (!config.containsKey(AWSConfigConstants.AWS_REGION)) {
- throw new IllegalArgumentException("The AWS region ('"
+ AWSConfigConstants.AWS_REGION + "') must be set in the config.");
+ final Region currentRegion = Regions.getCurrentRegion();
+ if (currentRegion != null) {
+
config.setProperty(AWSConfigConstants.AWS_REGION, currentRegion.getName());
+ } else {
+ throw new IllegalArgumentException("The AWS
region could not be identified automatically from the AWS API. " +
--- End diff --
I would rephrase this:
>The AWS region could not be identified automatically from the environment.
Automatic AWS region retrieval is only available when the consumer is run in
AWS environments, which is recommended for production usage to avoid
cross-region network traffic. When executed in non-AWS environments, please set
the region manually using the property AWSConfigConstants.AWS_REGION.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---