Does generating a pre-signed URL to an S3 object using the AWS SDK cost anything?

寵の児 提交于 2020-01-03 15:30:35

问题


Using the AWS SDK in any language, you can generate a pre-signed URL to an PRIVATE S3 object and then anyone who has the URL can use it download the object. This is explained here:

https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html

This is a great way to reduce load on your own server. You can pass off the actual download work to S3 if your clients with follow a redirect. My question is, does actually generating that URL cost anything--I mean actual MONEY. I understand that USING the URL will incur a GET request charge but what about actually generating the URL? Is it equivalent to an S3 GET request ($.0004 per 1000 requests) or a PUT request ($.005 per 1000 requests) or both or neither or something else? I can't seem to find any documentation this. This is important if you're talking about 10s of millions of requests.


回答1:


No, it doesn't cost anything. Generating a pre-signed URL is a purely client-side operation. There are no AWS costs associated with this and there is no network activity. The SDK you're using takes your current credentials, the bucket and key for your object, your method of choice (e.g. GET), an expiration time, optional HTTP headers, and calculates and signs a URL, all done locally.



来源:https://stackoverflow.com/questions/55231229/does-generating-a-pre-signed-url-to-an-s3-object-using-the-aws-sdk-cost-anything

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