Installation guide

debug Set to true to enable debug mode to print information about each download. Setting this value to an
fopen resource will write the debug output to a stream rather than to STDOUT.
allow_resumableSet to true to allow previously interrupted downloads to be resumed using a Range GET
More control with the DownloadSyncBuilder
The downloadBucket() method is an abstraction layer over the much more powerful
Aws\S3\Sync\DownloadSyncBuilder. You can use a DownloadSyncBuilder object directly if you need
more control over the transfer. Using the DownloadSyncBuilder allows for the following advanced features:
• Can download only files that match a regular expression
Just like the UploadSyncBuilder, you can specify a custom \Iterator object to use to yield files to a
DownloadSync object.
Can specify the Aws\S3\Sync\FilenameConverterInterface objects used to convert Amazon S3
object names to local filenames and vice versa.
use Aws\S3\Sync\DownloadSyncBuilder;
DownloadSyncBuilder::getInstance()
->setClient($client)
->setDirectory('/path/to/directory')
->setBucket('my-bucket')
->setKeyPrefix('/under-prefix')
->allowResumableDownloads()
->build()
->transfer();
Cleaning up
Now that we've taken a tour of how you can use the Amazon S3 client, let's clean up any resources we may have
created.
// Delete the objects in the bucket before attempting to delete
// the bucket
$clear = new ClearBucket($client, $bucket);
$clear->clear();
// Delete the bucket
$client->deleteBucket(array('Bucket' => $bucket));
// Wait until the bucket is not accessible
$client->waitUntilBucketNotExists(array('Bucket' => $bucket));
API Reference
Please see the Amazon Simple Storage Service Client API reference for a details about all of the available methods,
including descriptions of the inputs and outputs.
AbortMultipartUpload (service docs) CompleteMultipartUpload (service docs)
CopyObject (service docs) CreateBucket (service docs)
CreateMultipartUpload (service docs) DeleteBucket (service docs)
DeleteBucketCors (service docs) DeleteBucketLifecycle (service docs)
DeleteBucketPolicy (service docs) DeleteBucketTagging (service docs)
DeleteBucketWebsite (service docs) DeleteObject (service docs)
DeleteObjects (service docs) GetBucketAcl (service docs)
GetBucketCors (service docs) GetBucketLifecycle (service docs)
Amazon Simple Storage Service
111