Is there a way to use the Amazon .NET AWS SDK's AmazonS3 client on 'publicly readable buckets' without specifying AWS credentials?

假装没事ソ 提交于 2020-01-02 07:18:10

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/7743838/is-there-a-way-to-use-the-amazon-net-aws-sdks-amazons3-client-on-publicly-rea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!