How To: Amazon S3 + Torrents

While I have seen a few mentions of Amazon S3 supporting BitTorrent tracking and file-sharing, I don't think it has been a well publicized feature. PSTAM reader Carlton Bale wrote a great guide for getting Amazon S3 to create a torrent for a file of yours on S3 and seed the file. He goes through everything from setting up S3 for the first time to distributing the .torrent file.

For those of you already adept with S3, setting up a torrent is amazingly easy. Make sure your file is publicly viewable within your bucket and proceed to access the file in a web browser as you usually would, but add ?torrent to the end of the URL. For example, if I wanted to distribute the image sprites file for this site (not sure why I would), I would visit the following URL:

http://stammy.s3.amazonaws.com/sprites.png?torrent Amazon S3 Torrents

Amazon creates a torrent file and it automatically comes up as a download in your browser. Now you can publish the .torrent file online or hand out to your friends to distribute. Amazon takes care of the tracking and boosts the initially seeding. However, after the swarm speed is moderately speedy, you will want to delete or take away world readable permissions of the original file if you are worried about bandwidth charges from too much S3 seeding. This tactic might come in handy if your torrent file somehow ends up on digg and you don't want to be handed a large S3 bill. That and some people will be smart enough to remove the "?torrent" (if you don't host the torrent elsewhere) from the URL and download it directly from S3, increasing your bandwidth bill severely.

Like it? Tweet it.

"How To: Amazon S3 + Torrents" by @Stammy

Get new articles via email