S3 Transfer Automation > The specified bucket does not exist
I'm trying to use WinSCPnet to upload files to S3 using script task in SSIS.
This is my code (using Winscp version 5.14.1.beta) :
// Set up session options
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.S3,
HostName = "<bucketName>.s3-eu-west-1.amazonaws.com",
UserName = "*****************",
Password = "***************************",
};
using (Session session = new Session())
{
session.Open(sessionOptions);
//logic here
}Here's my code :The specified bucket does not exist
string LocalDirectoryPath = "C:\path\to\file"; string RemoteDirectoryPath = "/<BucketName>/"; bool DeleteSourceFiles = false; TransferOptions transferOptions = new TransferOptions(); session.PutFiles(LocalDirectoryPath, RemoteDirectoryPath, DeleteSourceFiles, transferOptions);
In the WinSCP UI I have the same behaviour. If I use the following configuration it works :WinSCP.SessionRemoteException: Copying files to remote side failed. Specify target bucket
HostName = "s3-eu-west-1.amazonaws.com" Remote directory = "/<bucketName>"
HostName = "<bucketName>.s3-eu-west-1.amazonaws.com" Remote directory = "/"
Copying files to remote side failed. Specify target bucket
Could you please take a look at this ? Thank's
The logs generated by WinSCP :