deno-aws_api icon indicating copy to clipboard operation
deno-aws_api copied to clipboard

s3: getSignedUrl is missing

Open TillaTheHun0 opened this issue 3 years ago • 3 comments

I was looking to use getSignedUrl for uploading directly to s3, but didn't see the method in the generated s3 service. I do see it on the s3 service on the aws sdk referenced on main

Am I looking in the wrong place? Thanks for your help!

TillaTheHun0 avatar Feb 09 '22 19:02 TillaTheHun0

Hey, thanks for writing!

High level, you're not missing anything here. The focus of this library is to provide clients to the AWS APIs, and pre-signing isn't actually an API call so it wasn't really in scope. This was previously brought up in #5. Please note that /x/aws_api isn't the actual AWS SDK.

In that linked discussion, there is a link to an /x/ module just for pre-signing, check out the message here: https://github.com/cloudydeno/deno-aws_api/issues/5#issuecomment-927862540 and I also have an example of using it with the /x/aws_api credential loader. I used that pre-signing module in another project and it does the trick, albeit with a somewhat narrow API.

In summary, it would be interesting to work pre-signing methods into this module but there's nothing committed or in progress towards this feature at the exact moment. Definitely let me know if the other options work for your needs!

danopia avatar Feb 09 '22 21:02 danopia

Agh, I missed that issue. Apologies for the dupe. I'll try out the solutions proposed there. Feel free to close this.

TillaTheHun0 avatar Feb 10 '22 19:02 TillaTheHun0

All good! I'd still like to track common requests like these so that I can discover what additional features to work on. In this case, the big dependency for pre-signing is defining an internal API to build signed URLs. It would be worth doing if the other options are lacking for some reason or another, which is the kind of thing you can provide a voice on as a user :)

Regardless, I haven't documented this sort of limitation properly, so either way I have something to do before closing this issue

danopia avatar Feb 10 '22 23:02 danopia

:rocket: This is added in v0.8.0. There is a low-level presigning API and a high-level "extras" module for S3 presigning.

Example usages of both APIs are in this comment:

  • https://github.com/cloudydeno/deno-aws_api/issues/5#issuecomment-1445245504

danopia avatar Feb 26 '23 01:02 danopia