1

I am using Amazon S3 for hosting images in a blog-like platform, and I can't find any good resources about whether or not I should keep or delete images not in use. There are no plans on having any media manager, but I'm not sure if it's worth the effort to make sure images are deleted when the image is either removed from a post, or when the post is deleted in its entirety.

For example, I notice Medium is not deleting my images, but they may be cleaning this up every now and then in the long term. I can see some practical uses of images remaining in case someone is linking to them or something, but obviously users need to be able to take them down.

My question summed up, is whether or not I should keep images in S3, or if I should delete them whenever they stop being in use.

1 Answers1

1

Storing a few extra images in S3 is going to cost almost nothing, so I assume that this is not to save money? So leaving them there is not going to create any real problems if thats what you want to do.

On the other hand, if you want to remove the file from the s3 bucket to keep it 'tidy', so to speak, and prevent it from being used in the future, you could delete it, or if it was me, I'd move it to another s3 bucket, and have a lifecycle policy assigned to that bucket that moves the file off to glacier for long-term archival.

This way you get the benefit of 'deleting' the image from your s3 bucket, but also the advantage of still being able to retrieve the images from Glacier if you ever need it.

E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116