Having us-west-2 set as region in the environment variables, the following createWriter command fails:
// get us-west-2 region from AWS_REGION / AWS_DEFAULT_REGION variables
final String s3Region = new DefaultAwsRegionProviderChain().getRegion();
N5Writer w = new N5Factory().s3Region(s3Region).s3UseCredentials().createWriter( "s3://aind-scratch-data/gabor.kovacs/testcontainer.n5" );
with
com.amazonaws.services.s3.model.AmazonS3Exception: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2' (Service: Amazon S3; Status Code: 400; Error Code: AuthorizationHeaderMalformed; Request ID: ...
I think the us-east-1 may come from here. Note that using the path-like uri that contains the region information explicitly, works:
// Works
N5Writer w = new N5Factory().createWriter( "https://s3-us-west-2.amazonaws.com/aind-scratch-data/gabor.kovacs/testcontainer.n5"
full_error.txt
Having
us-west-2set as region in the environment variables, the following createWriter command fails:with
I think the
us-east-1may come from here. Note that using the path-like uri that contains the region information explicitly, works:full_error.txt