lukeyan2023 opened a new issue, #14410:
URL: https://github.com/apache/dolphinscheduler/issues/14410

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar feature requirement.
   
   
   ### Description
   
   
   Version information: 3.1.7
   
   When I use a third-party AWS S3 compatible Object storage and use a custom 
region name, the AWS client will fail to initialize and report an error as 
follows:
   
   
![1687822411798](https://github.com/apache/dolphinscheduler/assets/108530647/f5b5c294-07d6-4880-8049-61dd6ff7c0cf)
   
   The reason for the above error is that the AWS client called the following 
method of the AWS SDK when initializing and setting region information. This 
method checks whether the passed in region name exists in the enumeration 
variables already defined in the AWS SDK. If it does not exist, it will trigger 
the above error
   
   
![8c706a54ddb933d6adfcf47d41f246a](https://github.com/apache/dolphinscheduler/assets/108530647/c728467d-5691-41f9-9ad9-9f4fff5561dd)
   
   In fact, whether using the AWS official S3 Object storage or the third-party 
AWS S3 compatible Object storage, the following error will be triggered as long 
as the region name is not predefined in the AWS SDK currently in use.
   
   There are two main solutions:
   
   First, when you use the AWS official S3 Object storage, you can upgrade the 
AWS SDK to ensure that the predefined region name in the new AWS SDK contains 
the region name you intend to use.
   
   Second, when you use a third-party AWS S3 compatible Object storage and 
customize the region name (the region name does not exist in the AWS SDK) or do 
not want to upgrade the AWS SDK, you can fill in the region name in the form of 
a string when initializing the AWS client instead of calling Region.forName
   
   
![27b819be4988d295ec1730418961596](https://github.com/apache/dolphinscheduler/assets/108530647/eaf18c50-0183-48a6-874a-48229fd20346)
   
   
   So I suggest adding a method of filling in the area name in the form of a 
string in the relevant code for initializing the AWS client. The specific 
implementation can be discussed together
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to