[英]Making a RESTful call to Amazon Web service using Power-shell
I am trying to collect data from amazon web services. 我正在尝试从亚马逊网络服务收集数据。 Every time I make the call I get back a 403 Forbidden.
每次拨打电话时,我都会返回403 Forbidden。
This is what my code looks like (the link is jumbled): 这是我的代码的样子(链接混乱):
Invoke-RestMethod -Uri " https://hosted-data-work.s3.amazonaws.com/20161121T220310.324/dw_split/73610000000000001/assignment_fact/part00101.gzAWSAccessKeyId=ASIAJVX3JXfd5dfdfRKJNGM74Q&Expires=1479839499&Signature=J4JdyX53AwH6wExVmoVAtkweCEI%3D&resp222onse-contentdisposition=inline%3B%20filename%3D%22assignment_fact-00000-095582fd.gz%22%3B&x-amz-security-token=bluh " -Method Get 调用-RestMethod -uri“ https://hosted-data-work.s3.amazonaws.com/20161121T220310.324/dw_split/73610000000000001/assignment_fact/part00101.gzAWSAccessKeyId=ASIAJVX3JXfd5dfdfRKJNGM74Q&Expires=1479839499&Signature=J4JdyX53AwH6wExVmoVAtkweCEI%3D&resp222onse-contentdisposition=inline%3B% 20filename%3D%22assignment_fact-00000-095582fd.gz%22%3B&x-amz-security-token = bluh “-方法获取
The link above is a download file. 上面的链接是一个下载文件。 I just want to get the data the simplest way possible.
我只想以最简单的方式获取数据。 What else do I need to add in the call?
我还需要在通话中添加什么? I have no clue about aws!
我对aws一无所知!
How did you generate that URL? 您是如何生成该URL的? It looks like a presigned URL, which means the authorization for accessing the object will be granted based on the credentials used when presigning.
它看起来像一个预签名的URL,这意味着将根据预签名时使用的凭据来授予访问对象的授权。 There are a couple of possible reasons that could be giving you a not authorized response:
有两种可能的原因可能会给您未经授权的答复:
Any of those could be causing the result you're seeing. 这些都可能导致您看到的结果。
I was misinformed and took a bad approach at this problem. 我被误导了,对这个问题采取了不好的方法。 I did not know I can simply download the file to my computer.
我不知道我可以简单地将文件下载到我的计算机上。 I though it had to be transferred from bucket to bucket, then to my computer.
虽然我必须将它从一个存储桶转移到另一个存储桶,然后再传输到我的计算机。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.