Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

simoncdarlow

Connection to Amazon S3 via command line is failing

Hi,

I use command line WINSCP for SFTP and WEBDAV regularly. Today is my first time getting this to work against Amazon S3. After upgrading to latest version we are able to connect to S3 via the winscp client.

However we have had no luck connecting via the scripting which is really want we need.

Here is the script

open s3://mykey:mypassword@s3.amazonaws.com/
lcd G:\Production\Suppliers
cd /mybucket/subfolder/
put Products.csv
exit

Resulting output from this call is:

Connecting to host...
Access denied.
Access Denied
Extra Details: RequestId: 89B832BA562EA9EB, HostId: Jm1ZVlLLSxi7Vxoy5l+Xk09XGhyVRSzBdGAtNummS+xcQ4oGimFEG3dv82vn4Cxes+ktUAYUABk=
Connection failed.

I have tried editing the app key and secret key and when these are wrong i get accurate error messages from S3 saying they are wrong. However when they are accurate we just get Access Denied.

I suspect the issue is it's trying to default to the root folder of S3 which we don't have access to and this is failing. It seems regardless of the command entered after the 'open' it always gives access denied. Is there a way to default the remote path from the command line like you can in the GUI.

I've exhausted all avenues and wonder if this is supported and are there any tricks.

Regards.
Simon.