From af989c0780e9b0c289fa7b96e55ffbc4b22a5524 Mon Sep 17 00:00:00 2001 From: David Pilato Date: Tue, 28 Jun 2016 08:50:50 +0200 Subject: [PATCH] Support new Asia Pacific (Mumbai) ap-south-1 AWS region AWS [announced](http://www.allthingsdistributed.com/2016/06/introducing-aws-asia-pacific-mumbai-region.html) a new region: Asia Pacific (Mumbai) `ap-south-1`. We need to support it for: * repository-s3: s3.ap-south-1.amazonaws.com or s3-ap-south-1.amazonaws.com * discovery-ec2: ec2.ap-south-1.amazonaws.com For reference: http://docs.aws.amazon.com/general/latest/gr/rande.html Closes #19110. --- docs/plugins/discovery-ec2.asciidoc | 25 +++++++++---------- docs/plugins/repository-s3.asciidoc | 25 +++++++++---------- .../cloud/aws/AwsEc2ServiceImpl.java | 2 ++ .../cloud/aws/InternalAwsS3Service.java | 2 ++ 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/docs/plugins/discovery-ec2.asciidoc b/docs/plugins/discovery-ec2.asciidoc index 17659d496b8..224080c522c 100644 --- a/docs/plugins/discovery-ec2.asciidoc +++ b/docs/plugins/discovery-ec2.asciidoc @@ -105,19 +105,18 @@ cloud: The `cloud.aws.region` can be set to a region and will automatically use the relevant settings for both `ec2` and `s3`. The available values are: -* `us-east` (`us-east-1`) -* `us-west` (`us-west-1`) -* `us-west-1` -* `us-west-2` -* `ap-southeast` (`ap-southeast-1`) -* `ap-southeast-1` -* `ap-southeast-2` -* `ap-northeast` (`ap-northeast-1`) -* `ap-northeast-2` (`ap-northeast-2`) -* `eu-west` (`eu-west-1`) -* `eu-central` (`eu-central-1`) -* `sa-east` (`sa-east-1`) -* `cn-north` (`cn-north-1`) +* `us-east` (`us-east-1`) for US East (N. Virginia) +* `us-west` (`us-west-1`) for US West (N. California) +* `us-west-2` for US West (Oregon) +* `ap-south-1` for Asia Pacific (Mumbai) +* `ap-southeast` (`ap-southeast-1`) for Asia Pacific (Singapore) +* `ap-southeast-2` for Asia Pacific (Sydney) +* `ap-northeast` (`ap-northeast-1`) for Asia Pacific (Tokyo) +* `ap-northeast-2` (`ap-northeast-2`) for Asia Pacific (Seoul) +* `eu-west` (`eu-west-1`) for EU (Ireland) +* `eu-central` (`eu-central-1`) for EU (Frankfurt) +* `sa-east` (`sa-east-1`) for South America (São Paulo) +* `cn-north` (`cn-north-1`) for China (Beijing) [[discovery-ec2-usage-signer]] ===== EC2 Signer API diff --git a/docs/plugins/repository-s3.asciidoc b/docs/plugins/repository-s3.asciidoc index 63e3ad311b2..e1f07f6c8e2 100644 --- a/docs/plugins/repository-s3.asciidoc +++ b/docs/plugins/repository-s3.asciidoc @@ -110,19 +110,18 @@ The `cloud.aws.region` can be set to a region and will automatically use the rel You can specifically set it for s3 only using `cloud.aws.s3.region`. The available values are: -* `us-east` (`us-east-1`) -* `us-west` (`us-west-1`) -* `us-west-1` -* `us-west-2` -* `ap-southeast` (`ap-southeast-1`) -* `ap-southeast-1` -* `ap-southeast-2` -* `ap-northeast` (`ap-northeast-1`) -* `ap-northeast-2` (`ap-northeast-2`) -* `eu-west` (`eu-west-1`) -* `eu-central` (`eu-central-1`) -* `sa-east` (`sa-east-1`) -* `cn-north` (`cn-north-1`) +* `us-east` (`us-east-1`) for US East (N. Virginia) +* `us-west` (`us-west-1`) for US West (N. California) +* `us-west-2` for US West (Oregon) +* `ap-south-1` for Asia Pacific (Mumbai) +* `ap-southeast` (`ap-southeast-1`) for Asia Pacific (Singapore) +* `ap-southeast-2` for Asia Pacific (Sydney) +* `ap-northeast` (`ap-northeast-1`) for Asia Pacific (Tokyo) +* `ap-northeast-2` (`ap-northeast-2`) for Asia Pacific (Seoul) +* `eu-west` (`eu-west-1`) for EU (Ireland) +* `eu-central` (`eu-central-1`) for EU (Frankfurt) +* `sa-east` (`sa-east-1`) for South America (São Paulo) +* `cn-north` (`cn-north-1`) for China (Beijing) [[repository-s3-usage-signer]] ===== S3 Signer API diff --git a/plugins/discovery-ec2/src/main/java/org/elasticsearch/cloud/aws/AwsEc2ServiceImpl.java b/plugins/discovery-ec2/src/main/java/org/elasticsearch/cloud/aws/AwsEc2ServiceImpl.java index 2aec30d6ddb..5ce110487c4 100644 --- a/plugins/discovery-ec2/src/main/java/org/elasticsearch/cloud/aws/AwsEc2ServiceImpl.java +++ b/plugins/discovery-ec2/src/main/java/org/elasticsearch/cloud/aws/AwsEc2ServiceImpl.java @@ -148,6 +148,8 @@ public class AwsEc2ServiceImpl extends AbstractLifecycleComponent endpoint = "ec2.ap-southeast-1.amazonaws.com"; } else if (region.equals("us-gov-west") || region.equals("us-gov-west-1")) { endpoint = "ec2.us-gov-west-1.amazonaws.com"; + } else if (region.equals("ap-south-1")) { + endpoint = "ec2.ap-south-1.amazonaws.com"; } else if (region.equals("ap-southeast-2")) { endpoint = "ec2.ap-southeast-2.amazonaws.com"; } else if (region.equals("ap-northeast") || region.equals("ap-northeast-1")) { diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/InternalAwsS3Service.java b/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/InternalAwsS3Service.java index 352aa196b06..287973a3a90 100644 --- a/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/InternalAwsS3Service.java +++ b/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/InternalAwsS3Service.java @@ -155,6 +155,8 @@ public class InternalAwsS3Service extends AbstractLifecycleComponent