1

I am using AWS dynamodb to store users data. Now I want to add profile images, images can be uploaded by users. Initially I thought of using S3 but after calculating price I decided to use own server for images and dynamodb to store user data.

For simplicity, lets say my user data at AWS dynamo looks like this:

{
  name:"Tom",
  profile_img:"https://myserver.com/a/b/c/d/4rwffdsg344322fe.png"
}

During profile creation or update stage I have uploaded images to my server and updated profile_image url to dynamodb.

My question is what is that best approach to secure images?

VK321
  • 5,768
  • 3
  • 44
  • 47
  • What calculation did you do to decide to host images in your server (compute+disk) instead of S3? By the way, you can use a pre-signed URL to securely serve images from S3. – Guy Oct 13 '22 at 23:55
  • @Guy - I calculated read and write. and reared this doc to make decision https://stackoverflow.com/questions/68773814/amazon-s3-store-millions-of-files I am aware of pre-signed url but how can i do same for custom solution. – VK321 Oct 14 '22 at 15:17
  • 1
    I wish you to get to the scale that you will benefit from your own implementation of S3. Until then, I believe that you are optimizing pre-maturely, and the example of the pre-signed URL functionality is one of many to show why you should start with a managed service. – Guy Oct 14 '22 at 15:58

0 Answers0