Код: Выделить всё
AwsBasicCredentials credentials = AwsBasicCredentials.create(accessKey, secretKey);
S3Client client = S3Client.builder()
.endpointOverride(new URI("https://endpoint.com"))
.credentialsProvider(StaticCredentialsProvider.create(credentials))
.serviceConfiguration(srvcConf -> {
srvcConf.pathStyleAccessEnabled();
})
.region(Region.US_EAST_1) // this is not used, but the AWS SDK requires it
.build();
Код: Выделить всё
authorization: AWS4-HMAC-SHA256 Credential=****/****/us-east-1/s3/aws4_request, SignedHeaders=endpoint.com;amz-sdk-request;host;x-amz-content-sha256;x-amz-date, Signature=5f32718c77bcc8f909e23bcaa80f90ec61fb2b0f6918e4344f9401de32249c43
Подробнее здесь: https://stackoverflow.com/questions/787 ... ned-header