AWS S3 Backup Location Constraint af-south-1


AWS recently launched in Cape Town, South Africa as af-south-1. We have a legal requirement to backup within the borders of the country so I setup an S3 Bucket (first time). I installed awscli, but when I run the cli command to test, I get the following error:

[user@vm]# virtualmin list-s3-files --access-key AKIAXXXXXXX --secret-key axAXXXXXXXX --bucket bucket1-mycompany-com

An error occurred (IllegalLocationConstraintException) when calling the ListObjects operation: The af-south-1 location constraint is incompatible for the region specific endpoint this request was sent to.

This is an AWS error, not a Virtualmin error. It’s has something to do with the bucket being assigned to a different geographic endpoint when it was created from the one to be used in production, or something along those lines; and subsequent requests being routed back to the original endpoint. Yeah, it’s a real joy.

I know that a year or so ago it could be overridden with a URL declaration in the command for the endpoint. For example, appending something like


to the command.

I don’t know if that still works, and I don’t even know if it’s the right region based on the endpoint with which the bucket was/is associated. Probably worth a try, though.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.