Is there a way to use the Amazon .NET AWS SDK's AmazonS3 client on 'publicly readable buckets' without specifying AWS credentials?
I would like to use Amazon's .NET SDK for accessing a publicly readable bucket, but the AWSClientFactory.CreateAmazonS3Client
开发者_开发问答 method for creating an AmazonS3
forces you to input your AwsAccessKey and AwsSecretAccessKey.
I do not want to include these in my client-side application, but I still want to use the SDK provided by Amazon to access these publicly readable objects on S3.
Is this possible?
I also asked this question on the AWS forum and an official Amazon employee responded:
As of the 1.3.8.0 release of the SDK you can pass null for the access and secret key and the SDK will skip the signing process and try the operations like GetObject as a public operation.
Norm
It's worth noting that at the time of writting, the current Amazon .NET SDK is at version '1.3.14', so passing null for the credentials is currently possible.
精彩评论