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

South Africa Region : af-south-1 not supported or causes error #99

Open
jadam opened this issue Jun 8, 2020 · 2 comments
Open

South Africa Region : af-south-1 not supported or causes error #99

jadam opened this issue Jun 8, 2020 · 2 comments

Comments

@jadam
Copy link

jadam commented Jun 8, 2020

Hi Developers,

The South African region was added in April 2020 and i don't the plugin has support for this region or there might be an error with the "AWS Credentials and Region" validation section

For Example :
On the form AWS Credentials and Region we added the "af-south-1" region and clicked validate, which outputs the following error :

Failure
java.net.UnknownHostException: s3-af-south-1.amazonaws.com
at java.net.InetAddress.getAllByName0(InetAddress.java:1281)

The endpoint mentioned above does not exists s3-af-south-1.amazonaws.com.

The correct endpoint would be s3.af-south-1.amazonaws.com

The generated dash is causing the issue.

Kindest Regards.
--Jameel

@jadam
Copy link
Author

jadam commented Jun 8, 2020

Hi,

I've added a code block to cater for our South African region "af-south-1", but need to test it.

Will verify once i get maven installed and re-compile the plugin, then test in Jenkins.

Here's the code i added to the AWSClientFactory.java file

        if (region.startsWith("af-")) {
            if (endpointStr.matches("s3-af-\\p{Alpha}+-\\d.amazonaws.com")) {
                endpointStr = endpointStr.replaceFirst("s3-af-", "s3.af-");
            }
        }

@jadam jadam closed this as completed Jun 8, 2020
@jadam jadam reopened this Jun 8, 2020
@aldrinleal
Copy link
Member

Hi,

I've added a code block to cater for our South African region "af-south-1", but need to test it.

Will verify once i get maven installed and re-compile the plugin, then test in Jenkins.

Here's the code i added to the AWSClientFactory.java file

        if (region.startsWith("af-")) {
            if (endpointStr.matches("s3-af-\\p{Alpha}+-\\d.amazonaws.com")) {
                endpointStr = endpointStr.replaceFirst("s3-af-", "s3.af-");
            }
        }

Make it a PR. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants