Amazon S3 region handling

The way Archiver handles the region depends on the type of S3 operation.

General S3 operations

  • If AWS_DEFAULT_REGION is defined, Archiver uses that region to query the region for the bucket.

  • If AWS_DEFAULT_REGION is not defined, Archiver uses AWS_GLOBAL region to query the region for the bucket.

If Archiver successfully retrieves the region for the bucket, then all upcoming requests use the region for the bucket. If Archiver cannot determine the bucket region, then all upcoming requests use AWS_GLOBAL region.

STS operations (Role Authentication)

  • If AWS_DEFAULT_REGION is defined, the STS Client uses that region to obtain the temporary credentials.

  • If AWS_DEFAULT_REGION is not defined, the STS Client uses the default region, us-east-1.

Once temporary credentials are obtained, Archiver gets the region for the bucket as for general S3 operations.

The environment variable AWS_REGION is reserved for internal use and should not be modified.