Jump to Content

Class GetObjectTorrentCommandProtected

Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're distributing large files. For more information about BitTorrent, see Using BitTorrent with Amazon S3.

You can get torrent only for objects that are less than 5 GB in size, and that are not encrypted using server-side encryption with a customer-provided encryption key.

To use GET, you must have READ access to the object.

This action is not supported by Amazon S3 on Outposts.

The following action is related to GetObjectTorrent:


Use a bare-bones client and the command you need to make an API call.

import { S3Client, GetObjectTorrentCommand } from "@aws-sdk/client-s3"; // ES Modules import
// const { S3Client, GetObjectTorrentCommand } = require("@aws-sdk/client-s3"); // CommonJS import
const client = new S3Client(config);
const command = new GetObjectTorrentCommand(input);
const response = await client.send(command);



To retrieve torrent files for an object

// The following example retrieves torrent files of an object.
const input = {
"Bucket": "examplebucket",
"Key": "HappyFace.jpg"
const command = new GetObjectTorrentCommand(input);
await client.send(command);
// example id: to-retrieve-torrent-files-for-an-object-1481834115959