Setting the region in the configuration file is ineffective. I am attempting to use the instance role. I have determined that I am able to access the bucket using the instance role. The bucket is in us-east-1 and the ec2 instance is in ap-southeast-2. I am running version 2.2.0
# cat /etc/apt/s3auth.conf
Region = 'us-east-1'
# apt update
...
301 HTTP Error 301: Moved Permanently - Set s3auth.conf region to match bucket 'Region': bucket may not be in ap-southeast-2 [PermanentRedirect] The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
It works correctly when using the environment:
AWS_REGION=us-east-1 apt update