views:

35

answers:

2

I have an S3 bucket setup as a streaming distribution with a CloudFront service attached to it. There are fairly sizable .flv files in there which I use to hook up JWPlayer using signed URL's.

After about a month of hosting these videos in S3 (and they have been watched by web site visitors several times), I just logged on using CloudBerry and noticed that my videos S3 bucket has a lot (like 10,000) of smaller files (2K or less in size) which I didn't create.

Are these some form of temporary files? Can I delete them out without harming anything? Is there some way to automatically clean these up? A few 2K files in there is no big deal, but once we start getting tons of these little files, the costs can start to add up. Not to mention as we keep adding videos, those will multiple like nuts.

+1  A: 

Save one to your desktop. Delete it from the cloud. See if it breaks things. If it doesn't, back up all the little files to your local storage, delete them all, see if it breaks.

I suspect they're thumbnails or some other garbage you can delete safely, but i'd back them up before dropping the nukes.

Caladain
So you're suggesting I delete a file, then test every single video (like 20) to see if any of them break? Seems like a lot of work...
Brandon Montgomery
20 videos isn't a lot to check. Check like 5. see if there is a correlation between the small file's name and the large file name. If there is, test the file it relates to. You've got random junk..i'm almost 100% you can just delete it..but i'm also paranoid, so i'd want to spend an hour and check it after doing the delete.
Caladain
There's no correlation between the names of the big files and the little files. I'm wondering if it has something to do with signed URL's. But it worked before those smaller files started getting created, and it appears that they weren't created in any timely manner.
Brandon Montgomery
Nuke from Orbit, it's the only way to be sure. (delete them and celebrate)
Caladain
A: 

After examining the contents of some of these "smaller" files, they looked like logs. Turns out, logging was enabled on the S3 bucket. I'm deleting them now and disabling logging on the bucket.

Brandon Montgomery