I am getting below error while trying to access ibm cloud storage
Container storage location with specified provisioning code not available (Service: Amazon > Status Code: 400.
Please see the snippet of code of i am using to create a bucket in ibm cloud storage using aws s3 client sdk.
String accessKey = (ACCESS_KEY);
String secretKey = (SECRET_KEY);
AWSCredentials credentials = new BasicAWSCredentials(accessKey,
secretKey);
AmazonS3Client s3service = new AmazonS3Client(credentials);
s3service.setEndpoint(END_POINT);
s3service.createBucket("samplebucket");
The above code is working only for us-south end point(s3.us-south.cloud-object-storage.appdomain.cloud)
As per the ibm official docs[0] there are the other endpoints for different regions, but none of them is working using above code.
String accessKey = (ACCESS_KEY); String secretKey = (SECRET_KEY); AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey); AmazonS3Client s3service = new AmazonS3Client(credentials); s3service.setEndpoint("https://s3.us-east.cloud-object-storage.appdomain.cloud"); s3service.createBucket("samplebucket");
– Neeraj