I installed .NET SDK and in Visual Studio, selected New Project -> AWS -> Storage and Content Delivery -> AWS S3 Sample. Given below is my code.
using (client = Amazon.AWSClientFactory.CreateAmazonS3Client())
{
ListBucketsResponse response = client.ListBuckets();
}
My app.config has 3 values:
<add key="AWSAccessKey" value="xxxx"/>
<add key="AWSSecretKey" value="xxxxxxxx"/>
<add key="AWSRegion" value="us-east-1"/>
I get following exception at the statement:
ListBucketsResponse response = client.ListBuckets();
Exception
The request signature we calculated does not match the signature you provided. Check your key and signing method.
Inner Exception
The remote server returned an error: (403) Forbidden.
Please help.
Not sure if you figured this out yet, but I can confirm that your code is working 100% when I substitute my credentials instead.
If you are sure your credentials are correct, then make sure you have the newest .net sdk installed and try again - just tried it myself with version 2.0.15.1 available here:
http://sdk-for-net.amazonwebservices.com/latest/AWSToolsAndSDKForNet.msi
and it works as expected.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.