-
I tried to use this SDK to create a bucket with region us-east-1(we use this region in our project). val request = CreateBucketRequest {
bucket = bucketName
createBucketConfiguration {
locationConstraint = BucketLocationConstraint.fromValue(properties.region)
}
}
try {
client.createBucket(request)
} catch (e: Exception) {
log.error("Failed to create bucket $bucketName", e)
throw StorageServiceException(e.message ?: "Failed to create bucket $bucketName")
} It failed, due to there is no How to fix this? |
Beta Was this translation helpful? Give feedback.
Answered by
aajtodd
Jun 13, 2022
Replies: 1 comment 1 reply
-
From the API reference docs for S3 CreateBucket
Try leaving the location constraint off when creating a bucket in |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hantsy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From the API reference docs for S3 CreateBucket
Try leaving the location constraint off when creating a bucket in
us-east-1
.