Reputation: 2415
I'm trying to get a static website hosted in AWS S3 to be the only way to download/view files from another S3 bucket.
Is this possible?
I've implemented a solution with a custom nodejs backend to do the validation and send the file to the front-end but I think this would be more expensive in the long run.
Upvotes: 0
Views: 626
Reputation: 1947
You can use the AWS SDK for Node to create a S3 pre-signed URL that makes the item available at that link temporarily... few seconds, few minutes. Every time you do it, you get a new unique URL that expires.
APIDoc: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property
Upvotes: 1