Using aws sdk (java 2.x) to access S3/Swift Object Storage
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

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

by
ANDREAM1
Created on 2022-07-26 09:28:23 (edited on 2024-09-04 14:25:46) in Storage and Backup

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

Here my code to create a S3Client:
AwsBasicCredentials awsCreds = AwsBasicCredentials.create(
"accessKeyId",
"secretAccessKey");

client = S3Client.builder()
.credentialsProvider(StaticCredentialsProvider.create(awsCreds))
.region(????)
.build();

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 software.amazon.awssdk.regions.Region 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?