Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malaysia Region is Not in Region Class #3176

Closed
1 of 2 tasks
panz3l opened this issue Feb 27, 2025 · 1 comment
Closed
1 of 2 tasks

Malaysia Region is Not in Region Class #3176

panz3l opened this issue Feb 27, 2025 · 1 comment
Labels
closed-for-staleness guidance Question that needs advice or information.

Comments

@panz3l
Copy link

panz3l commented Feb 27, 2025

Upcoming End-of-Support

  • I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.

Describe the bug

Malaysia Region (ap-southeast-5) is not in the Region Enum, so Lambda function that need to connect to S3 on Malaysia region will hit exception: java.lang.IllegalArgumentException: Cannot create enum from ap-southeast-5 value!

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

able to connect to Malaysia region S3 bucket with Lambda function.

Current Behavior

hit exception with:
java.lang.IllegalArgumentException: Cannot create enum from ap-southeast-5 value!

Reproduction Steps

when instantiate a S3 client object with below code:

AmazonS3 s3client = AmazonS3ClientBuilder
.standard()
.withRegion(Regions.fromName(region))
.withCredentials(new AWSStaticCredentialsProvider(basicAWSCredentials))
.build();

and passing in region = ap-southeast-5

exception will be thrown.

Possible Solution

add ap-southeast-5 to Region enum

Additional Information/Context

No response

AWS Java SDK version used

1.11.196

JDK version used

1.8.0_345

Operating System and version

windows 10

@panz3l panz3l added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 27, 2025
@debora-ito
Copy link
Member

debora-ito commented Feb 28, 2025

Hi @panz3l

This is expected as per our SDK Maintenance Policy, and it was highlighted in the V1 end-of-support announcement:

Once Maintenance Mode starts, "the SDK will not receive API updates for new or existing services, or be updated to support new regions."

The Regions enum will not get updated with new regions. The recommended way is to use RegionUtils.getRegion():

Region region = RegionUtils.getRegion("ap-southeast-5");

@debora-ito debora-ito added closing-soon This issue will close in 2 days unless further comments are made. guidance Question that needs advice or information. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 28, 2025
@debora-ito debora-ito pinned this issue Mar 3, 2025
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will close in 2 days unless further comments are made. labels Mar 5, 2025
@github-actions github-actions bot closed this as completed Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

2 participants