Unable to transfer artifacts due to AmazonS3Exception: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2'

Problem

You are unable do upload, copy or download artifacts due to Tasks for AWS encountering an AmazonS3Exception: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2'.

Solution

Despite the S3 bucket namespace being global, the Amazon S3 Object task uses regional API endpoints and thus requires the selected region to match the one where the bucket is actually located in.