8431 opened a new issue, #11627: URL: https://github.com/apache/dolphinscheduler/issues/11627
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When you deploy an application on the EC2 machine of AWS to operate S3, it will be rejected AWS EC2 machine will not use key access because of security policy   ### What you expected to happen When you deploy an application on the EC2 machine of AWS to operate S3, it will be rejected AWS EC2 machine will not use key access because of security policy Therefore, this problem can be compatible when building S3 client objects, so that EC2 machines in AWS can access S3 Whether the code can be compatible with the above scenario `AWSCredentialsProvider provider = new AWSCredentialsProviderChain( new EC2ContainerCredentialsProviderWrapper(), new AWSStaticCredentialsProvider(new BasicAWSCredentials(ACCESS_KEY_ID, SECRET_KEY_ID)));` `private S3Utils() { if (PropertyUtils.getString(RESOURCE_STORAGE_TYPE).equals(STORAGE_S3)) { AWSCredentialsProvider provider = new AWSCredentialsProviderChain( new EC2ContainerCredentialsProviderWrapper(), new AWSStaticCredentialsProvider(new BasicAWSCredentials(ACCESS_KEY_ID, SECRET_KEY_ID))); if (!StringUtils.isEmpty(PropertyUtils.getString(AWS_END_POINT))) { s3Client = AmazonS3ClientBuilder .standard() .withPathStyleAccessEnabled(true) .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(PropertyUtils.getString(AWS_END_POINT), Regions.fromName(REGION).getName())) .withCredentials(provider) .build(); } else { s3Client = AmazonS3ClientBuilder .standard() .withCredentials(provider) .withRegion(Regions.fromName(REGION)) .build(); } checkBucketNameIfNotPresent(BUCKET_NAME); } }` ### How to reproduce Deploy the dolphin scheduler project to the EC2 machine of AWS and configure S3 information. Then go to the resource management interface to create a folder ### Anything else _No response_ ### Version 3.0.0 ### Are you willing to submit 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]
