jasonsims / aws-cloudfront-sign

Utility module for AWS CloudFront
MIT License
176 stars 80 forks source link

generating signed urls for a large list of files #44

Open omidmaldar opened 7 years ago

omidmaldar commented 7 years ago

In Nodejs, generating signed url for a large list of files(~1000) takes time because it does the job in a single-thread manner. So I'm interested to know is there a way to create signed url for multiple files at once? for example by passing an array of object keys instead of passing one at a time? Or shall I consider generating signed-cookies? thanks

vhmth commented 6 years ago

Hey @omidmaldar what you can do is get signed cookies for a large list of files and then attach those cookies as URL params without the CloudFront- at the beginning of the param. One thing you may also want to attach is an Expires param that's essentially the expiration time you pass in. You can attach these values as either cookies or URL params and it should work.