Amazon S3: Region is not configurable

Advertisement

cyberbit
Joined:
Posts:
1

Amazon S3: Region is not configurable

See attachment for error. The region key is not correct, and there is no way for me to specifiy it. Note that this occurs when using AWS GovCloud, which is isolated from normal AWS services.

Text of screenshot:
The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-gov-west-1'

Extra Details: Region: us-gov-west-1, RequestId: AB3CB4671E441F7A, HostId: <...>
Connection failed.

Description: Screenshot of error

aws region error.png

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Re: Amazon S3: Region is not configurable

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Guest

steps to replicate

1) Turn on session logging
2) Connect to the regular AWS S3 service
3) search the session log for the line (near the top of the file): "S3: Default region: us-east-1"

Update WinSCP so we can configure the Default Region variable. Receive donation.

Reply with quote

Marko
Joined:
Posts:
3

Using the latest version (5.13.4), I've tried overriding the default region with the "S3DefaultRegion" raw session setting (as noted in changelog for version 5.12.1):
open ... -rawsettings S3DefaultRegion=eu-central-1

According to the log, the setting is applied, however I get the same error when trying to connect via scripting (see attached log #1).

When I use a stored session (with Hostname set to another region, e.g., "s3.eu-central-1.amazonaws.com"), no error appears and I connect successfully (see attached log #2).

Note that I am using the portable version of WinSCP.
  • 2.log (36.35 KB, Private file)
Description: Log with successful connection (using stored session)
  • 1.log (7.7 KB, Private file)
Description: Log with error

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Your stored session has the bucket set as initial remote directory. While the other script tries to access a root folder (bucket list).
Add the bucket to URL:
open s3://***:***@s3.eu-central-1.amazonaws.com/bucket/ -rawsettings S3DefaultRegion="eu-central-1"

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Re: Amazon S3: Region is not configurable

This issue has been added to the tracker:
https://winscp.net/tracker/1695

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

You can post new topics in this forum