PluginProbe
Media Cloud Sync / 1.2.12
Media Cloud Sync v1.2.12
1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 All 34 releases
media-cloud-sync / includes / sdk / s3 / README.md

README.md in Media Cloud Sync 1.2.12, at includes/sdk/s3/README.md

215 lines 12.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # AWS SDK for PHP - Version 3
2
3 [](https://twitter.com/awsforphp![@awsforphp on Twitter](http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat)](https://twitter.com/awsforphp](https://twitter.com/awsforphp)
4 [](https://packagist.org/packages/aws/aws-sdk-php![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php.svg?style=flat)](https://packagist.org/packages/aws/aws-sdk-php](https://packagist.org/packages/aws/aws-sdk-php)
5 [](http://aws.amazon.com/apache-2-0/![Apache 2 License](https://img.shields.io/packagist/l/aws/aws-sdk-php.svg?style=flat)](http://aws.amazon.com/apache-2-0/](http://aws.amazon.com/apache-2-0/)
6 [](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge![Gitter](https://badges.gitter.im/aws/aws-sdk-php.svg)](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
7 [](https://codecov.io/gh/aws/aws-sdk-php![codecov](https://codecov.io/gh/aws/aws-sdk-php/branch/master/graph/badge.svg)](https://codecov.io/gh/aws/aws-sdk-php](https://codecov.io/gh/aws/aws-sdk-php)
8
9 The **AWS SDK for PHP** makes it easy for developers to access [Amazon Web
10 Services][aws] in their PHP code, and build robust applications and software
11 using services like Amazon S3, Amazon DynamoDB, Amazon Glacier, etc. You can
12 get started in minutes by [installing the SDK through Composer][docs-installation]
13 or by downloading a single zip or phar file from our [latest release][latest-release].
14
15 Jump To:
16 * [](#Getting-StartedGetting Started](#Getting-Started](#Getting-Started)
17 * [](#Quick-ExamplesQuick Examples](#Quick-Examples](#Quick-Examples)
18 * [](#Getting-HelpGetting Help](#Getting-Help](#Getting-Help)
19 * [](#FeaturesFeatures](#Features](#Features)
20 * [](#ContributingContributing](#Contributing](#Contributing)
21 * [](#ResourcesMore Resources](#Resources](#Resources)
22 * [](#Related-AWS-ProjectsRelated AWS Projects](#Related-AWS-Projects](#Related-AWS-Projects)
23
24 ## Getting Started
25
26 1. **Sign up for AWS** – Before you begin, you need to
27 sign up for an AWS account and retrieve your [AWS credentials][docs-signup].
28 2. **Minimum requirements** – To run the SDK, your system will need to meet the
29 [minimum requirements][docs-requirements], including having **PHP >= 5.5**.
30 We highly recommend having it compiled with the cURL extension and cURL
31 7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
32 3. **Install the SDK** – Using [Composer] is the recommended way to install the
33 AWS SDK for PHP. The SDK is available via [Packagist] under the
34 [`aws/aws-sdk-php`][install-packagist] package. If Composer is installed globally on your system, you can run the following in the base directory of your project to add the SDK as a dependency:
35 ```
36 composer require aws/aws-sdk-php
37 ```
38 Please see the
39 [Installation section of the User Guide][docs-installation] for more
40 detailed information about installing the SDK through Composer and other
41 means.
42 4. **Using the SDK** – The best way to become familiar with how to use the SDK
43 is to read the [User Guide][docs-guide]. The
44 [Getting Started Guide][docs-quickstart] will help you become familiar with
45 the basic concepts.
46 5. **Beta: Removing unused services** — To date, there are over 300 AWS services available for use with this SDK.
47 You will likely not need them all. If you use Composer and would like to learn more about this feature,
48 please read the [linked documentation][docs-script-composer].
49
50
51 ## Quick Examples
52
53 ### Create an Amazon S3 client
54
55 ```php
56 <?php
57 // Require the Composer autoloader.
58 require 'vendor/autoload.php';
59
60 use Aws\S3\S3Client;
61
62 // Instantiate an Amazon S3 client.
63 $s3 = new S3Client([
64 'version' => 'latest',
65 'region' => 'us-west-2'
66 ]);
67 ```
68
69 ### Upload a file to Amazon S3
70
71 ```php
72 <?php
73 // Upload a publicly accessible file. The file size and type are determined by the SDK.
74 try {
75 $s3->putObject([
76 'Bucket' => 'my-bucket',
77 'Key' => 'my-object',
78 'Body' => fopen('/path/to/file', 'r'),
79 'ACL' => 'public-read',
80 ]);
81 } catch (Aws\S3\Exception\S3Exception $e) {
82 echo "There was an error uploading the file.\n";
83 }
84 ```
85
86 ## Getting Help
87
88 Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.
89
90 * Ask a question on [](https://stackoverflow.com/StackOverflow](https://stackoverflow.com/](https://stackoverflow.com/) and tag it with [](http://stackoverflow.com/questions/tagged/aws-php-sdk`aws-php-sdk`](http://stackoverflow.com/questions/tagged/aws-php-sdk](http://stackoverflow.com/questions/tagged/aws-php-sdk)
91 * Come join the AWS SDK for PHP [](https://gitter.im/aws/aws-sdk-phpgitter](https://gitter.im/aws/aws-sdk-php](https://gitter.im/aws/aws-sdk-php)
92 * Open a support ticket with [](https://console.aws.amazon.com/support/home/AWS Support](https://console.aws.amazon.com/support/home/](https://console.aws.amazon.com/support/home/)
93 * If it turns out that you may have found a bug, please [](https://github.com/aws/aws-sdk-php/issues/new/chooseopen an issue](https://github.com/aws/aws-sdk-php/issues/new/choose](https://github.com/aws/aws-sdk-php/issues/new/choose)
94
95 This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the [](https://forums.aws.amazon.com/Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/](https://forums.aws.amazon.com/).
96
97
98 ## Maintenance and support for SDK major versions
99
100 For information about maintenance and support for SDK major versions and their underlying dependencies, see the following in the [](https://docs.aws.amazon.com/credref/latest/refdocs/overview.htmlAWS SDKs and Tools Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/overview.html](https://docs.aws.amazon.com/credref/latest/refdocs/overview.html):
101
102 * [](https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.htmlAWS SDKs and Tools Maintenance Policy](https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html](https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html)
103 * [](https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.htmlAWS SDKs and Tools Version Support Matrix](https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.html](https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.html)
104
105
106 ### Opening Issues
107
108 If you encounter a bug with `aws-sdk-php` we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of `aws-sdk-php`, PHP version and OS you’re using. Please include a stack trace and a simple workflow to reproduce the case when appropriate, too.
109
110 The GitHub issues are intended for bug reports and feature requests. For help and questions with using `aws-sdk-php` please make use of the resources listed in the Getting Help section. There are limited resources available for handling issues and by keeping the list of open issues lean we can respond in a timely manner.
111
112 ## Features
113
114 * Provides easy-to-use HTTP clients for all supported AWS
115 [services][docs-services], [regions][docs-rande], and authentication
116 protocols.
117 * Is built on [Guzzle][guzzle-docs], and utilizes many of its features,
118 including persistent connections, asynchronous requests, middlewares, etc.
119 * Provides convenience features including easy result pagination via
120 [Paginators][docs-paginators], [Waiters][docs-waiters], and simple
121 [Result objects][docs-results].
122 * Provides a [multipart uploader tool][docs-s3-multipart] for Amazon S3 and
123 Amazon Glacier that can be paused and resumed.
124 * Provides an [Amazon S3 Stream Wrapper][docs-streamwrapper], so that you can
125 use PHP's native file handling functions to interact with your S3 buckets and
126 objects like a local filesystem.
127 * Provides an [Amazon S3 Encryption Client][docs-s3-encryption] for creating and interacting with encrypted objects in your S3 buckets.
128 * Provides the [Amazon DynamoDB Session Handler][docs-ddbsh] for easily scaling
129 sessions on a fast, NoSQL database.
130 * Automatically uses [IAM Instance Profile Credentials][aws-iam-credentials] on
131 configured Amazon EC2 instances.
132
133 ## Contributing
134
135 We work hard to provide a high-quality and useful SDK for our AWS services, and we greatly value feedback and contributions from our community. Please review our [](./CONTRIBUTING.mdcontributing guidelines](./CONTRIBUTING.md](./CONTRIBUTING.md) before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.
136
137
138 ## Resources
139
140 * [User Guide][docs-guide] – For both getting started and in-depth SDK usage information
141 * [API Docs][docs-api] – For details about operations, parameters, and responses
142 * [Blog][sdk-blog] – Tips & tricks, articles, and announcements
143 * [Sample Project][sdk-sample] - A quick, sample project to help get you started
144 * [Forum][sdk-forum] – Ask questions, get help, and give feedback
145 * [Issues][sdk-issues] – Report issues, submit pull requests, and get involved
146 (see [Apache 2.0 License][sdk-license])
147 * [@awsforphp][sdk-twitter] – Follow us on Twitter
148
149 ## Related AWS Projects
150
151 * [AWS Service Provider for Laravel][mod-laravel]
152 * [AWS SDK ZF2 Module][mod-zf2]
153 * [AWS Service Provider for Silex][mod-silex]
154 * [AWS SDK Bundle for Symfony][mod-symfony]
155 * [Amazon SNS Message Validator for PHP][sns-validator] - SNS validator without requiring SDK
156 * [Guzzle Version 7][guzzle-docs] – PHP HTTP client and framework
157 * For Version 2 of the SDK (deprecated):
158 * [User Guide][docs-guide-v2]
159 * [API Docs][docs-api-v2]
160 * [Serverless LAMP stack guide][serverless-LAMP-stack-guide] - A guide to building and deploying a serverless PHP application
161 * Other [AWS SDKs & Tools][aws-tools] (e.g., js, cli, ruby, python, java, etc.)
162
163 [sdk-website]: http://aws.amazon.com/sdkforphp
164 [sdk-forum]: https://forums.aws.amazon.com/forum.jspa?forumID=80
165 [sdk-issues]: https://github.com/aws/aws-sdk-php/issues
166 [sdk-license]: http://aws.amazon.com/apache2.0/
167 [sdk-blog]: https://aws.amazon.com/blogs/developer/category/php/
168 [sdk-twitter]: https://twitter.com/awsforphp
169 [sdk-sample]: http://aws.amazon.com/developers/getting-started/php
170
171 [install-packagist]: https://packagist.org/packages/aws/aws-sdk-php
172 [latest-release]: https://github.com/aws/aws-sdk-php/releases
173
174 [docs-api]: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html
175 [docs-guide]: http://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html
176 [docs-api-v2]: http://docs.aws.amazon.com/aws-sdk-php/v2/api/index.html
177 [docs-guide-v2]: http://docs.aws.amazon.com/aws-sdk-php/v2/guide/index.html
178 [docs-contribution]: https://github.com/aws/aws-sdk-php/blob/master/CONTRIBUTING.md
179 [docs-migration]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_migration.html
180 [docs-signup]: http://aws.amazon.com/developers/access-keys/
181 [docs-requirements]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_requirements.html
182 [docs-installation]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_installation.html
183 [docs-quickstart]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html#getting-started
184 [docs-paginators]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_paginators.html
185 [docs-waiters]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_waiters.html
186 [docs-results]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_basic-usage.html#result-objects
187 [docs-exceptions]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_basic-usage.html#handling-errors
188 [docs-wire-logging]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/faq.html#how-can-i-see-what-data-is-sent-over-the-wire
189 [docs-ddbsh]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/service_dynamodb-session-handler.html
190 [docs-services]: https://aws.amazon.com/products/
191 [docs-rande]: http://docs.aws.amazon.com/general/latest/gr/rande.html
192 [docs-streamwrapper]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-stream-wrapper.html
193 [docs-s3-transfer]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-transfer.html
194 [docs-s3-multipart]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-multipart-upload.html
195 [docs-s3-encryption]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-encryption-client.html
196 [docs-script-composer]: https://github.com/aws/aws-sdk-php/tree/master/src/Script/Composer
197
198 [aws]: http://aws.amazon.com
199 [aws-iam-credentials]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UsingIAM.html#UsingIAMrolesWithAmazonEC2Instances
200 [aws-tools]: http://aws.amazon.com/tools
201 [guzzle-docs]: http://guzzlephp.org
202 [composer]: http://getcomposer.org
203 [packagist]: http://packagist.org
204 [psr-7]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md
205 [psr-4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
206 [psr-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
207 [psr-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
208
209 [mod-laravel]: https://github.com/aws/aws-sdk-php-laravel
210 [mod-zf2]: https://github.com/aws/aws-sdk-php-zf2
211 [mod-silex]: https://github.com/aws/aws-sdk-php-silex
212 [mod-symfony]: https://github.com/aws/aws-sdk-php-symfony
213 [sns-validator]: https://github.com/aws/aws-php-sns-message-validator
214 [serverless-LAMP-stack-guide]: https://github.com/aws-samples/php-examples-for-aws-lambda
215