How to avoid using S3 Object keys in generated temporary URLs?

0

Hello there. I have private access to my S3 objects and I'm using s3.getSignedUrl('getObject', options) method from SDK in my Node.js app. It's good solution for me except for the one thing: as I have multiple user roles in my application, I want to hide file names (object Key) for some of them. For this I am considering the option with Gateways API to use it as proxy for my temporary generated URLs. Please, let me know if I'm on the right way. It'll be good to initially generate link with another name using getSignedUrl('getObject'), but I'm not sure that this is possible.

Example of my current code,:

const fileTempUrl = s3.getSignedUrl('getObject', { Bucket: bucketName, Key: objectKey, Expires: ONE_DAY });

Thanks.

1回答
1
profile picture
エキスパート
回答済み 1年前
  • Yes, but this implementation won't help me with main problem described in the question. URL will still contain Object Key

  • I see. then either a proxy as you suggested, or a lambda that copies the files in another folder with a hashed value for the key could be the left possibilities

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ