有没有办法使用的“公开可读水桶'亚马逊的AWS .NET SDK的AmazonS3客户端无需指定AWS凭据?

编程入门 行业动态 更新时间:2024-10-15 04:20:25
本文介绍了有没有办法使用的“公开可读水桶'亚马逊的AWS .NET SDK的AmazonS3客户端无需指定AWS凭据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想用亚马逊的.NET SDK访问公开可读水桶,但 AWSClientFactory.CreateAmazonS3Client 方法创建一个 AmazonS3 迫使你输入你的AwsAccessKey和AwsSecretAccessKey。

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.

我不希望在我的客户端应用程序包括这些,但我仍然希望使用亚马逊提供的SDK来在S3上访问这些公开可读的对象。

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.

这可能吗?

推荐答案

我也问过这个问题上的AWS论坛和亚马逊正式员工回答:

I also asked this question on the AWS forum and an official Amazon employee responded:

随着1.3.8.0版本的SDK,你可以通过在访问空   和密钥和SDK将跳过签名过程并尝试   像GetObject的业务作为一个公共操作。

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.

规范

值得一提的是,在书面方式时,目前亚马逊.NET SDK的版本为1.3.14,因此传递null作为凭证是目前可能的。

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.

更多推荐

有没有办法使用的“公开可读水桶'亚马逊的AWS .NET SDK的AmazonS3客户端无需指定AWS凭据?

本文发布于:2023-11-03 18:58:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555823.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:亚马逊   凭据   水桶   没有办法   客户端

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!