OVHcloud Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Using aws sdk (java 2.x) to access S3/Swift Object Storage


Is Swift Object Storage compatible with the “standard” aws sdk (v. 2.0) ?

Here my code to create a S3Client:
AwsBasicCredentials awsCreds = AwsBasicCredentials.create(

    client = S3Client.builder()

I found my accessKeyId and secretAccessKey, but I can’t set a proper vaue for “region”, because it is NOT a string, but an instance of class, that has a predefined values only (I think I should pass “gra”).
Does that mean I cannot use this sdk? Do I have to use the REST API?


Hi, solved by myself!
Use this code:

        Region gra = Region.of("gra");
        client = S3Client.builder()