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
전문가
답변함 일 년 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠