Skip to content

Commit

Permalink
Feat(MISC): Support for Asia Pacific Hyderabad region (#3087)
Browse files Browse the repository at this point in the history
* Support for Asia Pacific Hyderabad region

* Updated tests and regions in other places in the code
  • Loading branch information
gpanshu authored Nov 22, 2022
1 parent 97a04ad commit c2f2679
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,34 @@ public static List<Region> getRegions() {
updateRegion(region, "sqs", "sqs.me-central-1.amazonaws.com", false, true);
updateRegion(region, "sts", "sts.me-central-1.amazonaws.com", false, true);

// Support for Asia Pacific (Hyderabad) `ap-south-2` region
region = new Region("ap-south-2", "amazonaws.com");
ret.add(region);
updateRegion(region, "autoscaling", "autoscaling.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "cognito-identity", "cognito-identity.ap-south-2.amazonaws.com",
false, true);
updateRegion(region, "cognito-idp", "cognito-idp.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "cognito-sync", "cognito-sync.ap-south-2.amazonaws.com", false,
true);
updateRegion(region, "data.iot", "data.iot.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "dynamodb", "dynamodb.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "ec2", "ec2.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "elasticloadbalancing",
"elasticloadbalancing.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "firehose", "firehose.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "iot", "iot.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "kinesis", "kinesis.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "kms", "kms.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "lambda", "lambda.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "logs", "logs.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "polly", "polly.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "s3", "s3.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "sdb", "sdb.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "sns", "sns.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "sqs", "sqs.ap-south-2.amazonaws.com", false, true);
updateRegion(region, "sts", "sts.ap-south-2.amazonaws.com", false, true);


return ret;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ public enum Regions {
AP_SOUTHEAST_3("ap-southeast-3"),

/** me-central-1. */
ME_CENTRAL_1("me-central-1");
ME_CENTRAL_1("me-central-1"),

/** ap-south-2. */
AP_SOUTH_2("ap-south-2");

/**
* The default region that new customers in the US are encouraged to use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void testGetRegionByEndpointWithBogusEndpoint() {
@Test
public void testGetRegionsForService() {
List<Region> regions = RegionUtils.getRegionsForService(ServiceAbbreviations.SimpleDB);
assertEquals(regions.size(), 13);
assertEquals(regions.size(), 14);
boolean usEast1 = false;
boolean usWest1 = false;
for (Region curr : regions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,19 @@ public enum Region {
* bucket in this region.
* </p>
*/
ME_UAE("me-central-1");
ME_UAE("me-central-1"),

/**
* The Asia Pacific (Hyderabad) Region. This region uses Amazon S3 servers
* located in Hyderabad, India.
* <p>
* When using buckets in this region, set the client endpoint to
* <code>s3-ap-south-2.amazonaws.com</code> on all requests to these buckets
* to reduce any latency experienced after the first hour of creating a
* bucket in this region.
* </p>
*/
AP_HYD("ap-south-2");

/**
* Used to extract the S3 regional id from an S3 end point. Note this
Expand Down

0 comments on commit c2f2679

Please sign in to comment.