I am getting a InvalidLocationConstraint: The specified location-constraint is not valid
error when trying to create a S3 bucket in the af-south-1 (Cape Town) region using node.js aws-sdk, at version 2.726.0 (The latest at the time).
The region has been enabled and I am able to create a bucket using the management console. The IAM user I am using for debugging has full administrative access in the account.
My create bucket call is:
let res = await s3.createBucket({
Bucket: 'bucketname',
CreateBucketConfiguration: { LocationConstraint: 'af-south-1' }
}).promise();
This works for regions other than af-south-1.
In the documentation, a list of location constraints is given, is this list exhaustive of all possible options, or just a list of examples?
Is it possible to create a bucket in af-south-1 using the sdk, or am I doing something wrong?
This is similar to this question.