获得一个pre-验证URL到S3桶 [英] Getting a pre-authenticated URL to an S3 bucket

查看:210
本文介绍了获得一个pre-验证URL到S3桶的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试使用S3存储作为内部,自动更新应用程序文件的部署位置。这将是其中新版本的文件转储为应用程序精灵上的更新的位置。由于这是一个内部应用程序,我希望能有网址是私有的,但为了能够只使用一个URL来访问它。我希望寻找到使用第三方自动更新软件,这意味着我不能使用亚马逊的API来访问它。

I am attempting to use an S3 bucket as a deployment location for an internal, auto-updating application's files. It would be the location where the new version's files are dumped for the application to puck up on an update. Since this is an internal application, I was hoping to have the URL be private, but to be able to access it using only a URL. I was hoping to look into using third party auto updating software, which means I can't use the Amazon API to access it.

有谁知道一种方式来获得一个网址的私人一桶S3?

Does anyone know a way to get a URL to a private bucket on S3?

推荐答案

您可能希望使用现有的 AWS软件开发工具包(SDK),这都实现了各自的方法通过的获取preSignedURL()的方法(如Java的方式来产生这些网址:<一HREF =htt​​p://docs.amazonwebservices.com/AWSJavaSDK/latest/javadoc/index.html相对=nofollow>生成presignedUrl(),C#:<一href="http://docs.amazonwebservices.com/sdkfornet/latest/apidocs/html/M_Amazon_S3_AmazonS3_Get$p$pSignedURL.htm"相对=nofollow>获取preSignedURL()):

You probably want to use one of the available AWS Software Development Kits (SDKs), which all implement the respective methods to generate these URLs by means of the GetPreSignedURL() method (e.g. Java: generatePresignedUrl(), C#: GetPreSignedURL()):

在获取preSignedURL操作创建一个签名的http请求。询问   字符串认证是给予HTTP或浏览器访问有用   资源通常需要进行身份验证。当使用查询   字符串认证,创建一个查询,指定到期时间   对于查询,用你的签名签字,将数据以HTTP   请求,并且分发请求发送到用户或嵌入​​在请求   网页。可以为GET可以产生preSigned网址,PUT和HEAD   操作上的水桶,键和版本

The GetPreSignedURL operations creates a signed http request. Query string authentication is useful for giving HTTP or browser access to resources that would normally require authentication. When using query string authentication, you create a query, specify an expiration time for the query, sign it with your signature, place the data in an HTTP request, and distribute the request to a user or embed the request in a web page. A PreSigned URL can be generated for GET, PUT and HEAD operations on your bucket, keys, and versions.

有几个相关的问题已经和EG <一href="http://stackoverflow.com/questions/9051650/why-is-my-s3-$p$p-signed-request-invalid-when-i-set-a-response-header-override-th">Why是我的S3 pre-签名的请求无效,当我设置一个包含响应头覆盖了+?包含在C#中的工作示例(除了内容类型的问题Ragesh正在经历当然)。

There are a couple of related questions already and e.g. Why is my S3 pre-signed request invalid when I set a response header override that contains a "+"? contains a working sample in C# (aside from the content type issue Ragesh is experiencing of course).

祝你好运!

这篇关于获得一个pre-验证URL到S3桶的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆