aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.16k stars 833 forks source link

New region ap-southeast-5 metadata is not available #5548

Closed daeho-ro closed 4 days ago

daeho-ro commented 2 weeks ago

Describe the bug

Below test is failed and so I cannot obtain instances info from the new region.

Assert.assertTrue(Ec2Client.serviceMetadata().regions().contains(Region.of("ap-southeast-5")));

Last time, this was happen for ca-west-1 and here comes again.

Expected Behavior

The test should pass and can obtain ec2 info from ap-southeast-5

Current Behavior

The test was failed and can not obtain ec2 info from ap-southeast-5

Reproduction Steps

Assert.assertTrue(Ec2Client.serviceMetadata().regions().contains(Region.of("ap-southeast-5")));

Possible Solution

Should add the new region metadata into the sdk?

Additional Information/Context

No response

AWS Java SDK version used

2.27.17

JDK version used

corretto-1.8.0_402, corretto-21.0.2 both

Operating System and version

macOS Sonoma 14.5

debora-ito commented 1 week ago

Acknowledged.

debora-ito commented 4 days ago

An update was released yesterday in SDK version 2.27.23, ap-southeast-5 is now in the list.

To not rely so much on static code to obtain the list of regions, consider using System Manager's Infrastructure APIs: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-public-parameters-global-infrastructure.html

aws ssm get-parameters-by-path \
    --path /aws/service/global-infrastructure/services/ec2/regions \
    --query 'Parameters[].Value'

I did some local tests and there's one difference: the SSM get-parameters-by-path response doesn't include us-iso- or fips- regions, but this may be a good alternative if your use case doesn't use those regions.

github-actions[bot] commented 4 days ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.