I have this in app.config:
<appSettings>
<add key="AWSProfileName" value="myName"/>
<add key="AWSRegion" value="eu-west-1" />
</appSettings>
Then I try to run this:
using Amazon.S3;
using Amazon.S3.Model;
namespace createCSV
{
class S3
{
public void uploadObject()
{
//IAmazonS3 client;
string AwsAccessKey = "xxxxxxxxxxxxx";
string AwsSecretKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
IAmazonS3 client = new AmazonS3Client(AwsAccessKey,AwsSecretKey);
PutObjectRequest request = new PutObjectRequest()
{
BucketName = @"http://s3-eu-west-1.amazonaws.com/bucketName/",
Key = @"test/blah.txt",
FilePath = @"P:\data_analysis\foo\blah.txt"
};
PutObjectResponse response2 = client.PutObject(request); //<<exception here
}
}
}
I get an exception on the line marked saying:
Output>>
Cannot find or open the PDB file. Exception thrown: 'Amazon.S3.AmazonS3Exception' in AWSSDK.dll
AmazonS3exception was unhandled:
An unhandled exception of type 'Amazon.S3.AmazonS3Exception' occurred in AWSSDK.dll
Additional information: The specified bucket does not exist
I've tried lots of different configurations for the line BucketName = @"http://s3-eu-west-1.amazonaws.com/bucketName/"
with still the same exception - can anyone help?