PluginProbe
Media Cloud Sync / 1.3.11
Media Cloud Sync v1.3.11
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.3.11, at includes/sdk/s3/README.md

212 lines 11.8 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://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)
4 [](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/)
5 [](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)
6 [](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)
7
8 The **AWS SDK for PHP** makes it easy for developers to access [Amazon Web
9 Services][aws] in their PHP code, and build robust applications and software
10 using services like Amazon S3, Amazon DynamoDB, Amazon Glacier, etc. You can
11 get started in minutes by [installing the SDK through Composer][docs-installation]
12 or by downloading a single zip or phar file from our [latest release][latest-release].
13
14 Jump To:
15 * [](#Getting-StartedGetting Started](#Getting-Started](#Getting-Started)
16 * [](#Quick-ExamplesQuick Examples](#Quick-Examples](#Quick-Examples)
17 * [](#Getting-HelpGetting Help](#Getting-Help](#Getting-Help)
18 * [](#FeaturesFeatures](#Features](#Features)
19 * [](#ContributingContributing](#Contributing](#Contributing)
20 * [](#ResourcesMore Resources](#Resources](#Resources)
21 * [](#Related-AWS-ProjectsRelated AWS Projects](#Related-AWS-Projects](#Related-AWS-Projects)
22
23 ## Getting Started
24
25 1. **Sign up for AWS** – Before you begin, you need to
26 sign up for an AWS account and retrieve your [AWS credentials][docs-signup].
27 2. **Minimum requirements** – To run the SDK, your system will need to meet the
28 [minimum requirements][docs-requirements], including having **PHP >= 8.1**.
29 We highly recommend having it compiled with the cURL extension and cURL
30 7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
31 3. **Install the SDK** – Using [Composer] is the recommended way to install the
32 AWS SDK for PHP. The SDK is available via [Packagist] under the
33 [`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:
34 ```
35 composer require aws/aws-sdk-php
36 ```
37 Please see the
38 [Installation section of the User Guide][docs-installation] for more
39 detailed information about installing the SDK through Composer and other
40 means.
41 4. **Using the SDK** – The best way to become familiar with how to use the SDK
42 is to read the [User Guide][docs-guide]. The
43 [Getting Started Guide][docs-quickstart] will help you become familiar with
44 the basic concepts.
45 5. **Beta: Removing unused services** — To date, there are over 300 AWS services available for use with this SDK.
46 You will likely not need them all. If you use Composer and would like to learn more about this feature,
47 please read the [linked documentation][docs-script-composer].
48
49
50 ## Quick Examples
51
52 ### Create an Amazon S3 client
53
54 ```php
55 <?php
56 // Require the Composer autoloader.
57 require 'vendor/autoload.php';
58
59 use Aws\S3\S3Client;
60
61 // Instantiate an Amazon S3 client.
62 $s3 = new S3Client([
63 'version' => 'latest',
64 'region' => 'us-west-2'
65 ]);
66 ```
67
68 ### Upload a file to Amazon S3
69
70 ```php
71 <?php
72 // Upload a publicly accessible file. The file size and type are determined by the SDK.
73 try {
74 $s3->putObject([
75 'Bucket' => 'my-bucket',
76 'Key' => 'my-object',
77 'Body' => fopen('/path/to/file', 'r'),
78 'ACL' => 'public-read',
79 ]);
80 } catch (Aws\S3\Exception\S3Exception $e) {
81 echo "There was an error uploading the file.\n";
82 }
83 ```
84
85 ## Getting Help
86
87 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.
88
89 * 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)
90 * 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)
91 * 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/)
92 * 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)
93
94 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/).
95
96
97 ## Maintenance and support for SDK major versions
98
99 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):
100
101 * [](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)
102 * [](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)
103
104
105 ### Opening Issues
106
107 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.
108
109 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.
110
111 ## Features
112
113 * Provides easy-to-use HTTP clients for all supported AWS
114 [services][docs-services], [regions][docs-rande], and authentication
115 protocols.
116 * Is built on [Guzzle][guzzle-docs], and utilizes many of its features,
117 including persistent connections, asynchronous requests, middlewares, etc.
118 * Provides convenience features including easy result pagination via
119 [Paginators][docs-paginators], [Waiters][docs-waiters], and simple
120 [Result objects][docs-results].
121 * Provides a [multipart uploader tool][docs-s3-multipart] for Amazon S3 and
122 Amazon Glacier that can be paused and resumed.
123 * Provides an [Amazon S3 Stream Wrapper][docs-streamwrapper], so that you can
124 use PHP's native file handling functions to interact with your S3 buckets and
125 objects like a local filesystem.
126 * Provides an [Amazon S3 Encryption Client][docs-s3-encryption] for creating and interacting with encrypted objects in your S3 buckets.
127 * Provides the [Amazon DynamoDB Session Handler][docs-ddbsh] for easily scaling
128 sessions on a fast, NoSQL database.
129 * Automatically uses [IAM Instance Profile Credentials][aws-iam-credentials] on
130 configured Amazon EC2 instances.
131
132 ## Contributing
133
134 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.
135
136
137 ## Resources
138
139 * [User Guide][docs-guide] – For both getting started and in-depth SDK usage information
140 * [API Docs][docs-api] – For details about operations, parameters, and responses
141 * [Blog][sdk-blog] – Tips & tricks, articles, and announcements
142 * [Sample Project][sdk-sample] - A quick, sample project to help get you started
143 * [Forum][sdk-forum] – Ask questions, get help, and give feedback
144 * [Issues][sdk-issues] – Report issues, submit pull requests, and get involved
145 (see [Apache 2.0 License][sdk-license])
146
147 ## Related AWS Projects
148
149 * [AWS Service Provider for Laravel][mod-laravel]
150 * [AWS SDK ZF2 Module][mod-zf2]
151 * [AWS Service Provider for Silex][mod-silex]
152 * [AWS SDK Bundle for Symfony][mod-symfony]
153 * [Amazon SNS Message Validator for PHP][sns-validator] - SNS validator without requiring SDK
154 * [Guzzle Version 7][guzzle-docs] – PHP HTTP client and framework
155 * For Version 2 of the SDK (deprecated):
156 * [User Guide][docs-guide-v2]
157 * [API Docs][docs-api-v2]
158 * [Serverless LAMP stack guide][serverless-LAMP-stack-guide] - A guide to building and deploying a serverless PHP application
159 * Other [AWS SDKs & Tools][aws-tools] (e.g., js, cli, ruby, python, java, etc.)
160
161 [sdk-website]: http://aws.amazon.com/sdkforphp
162 [sdk-forum]: https://forums.aws.amazon.com/forum.jspa?forumID=80
163 [sdk-issues]: https://github.com/aws/aws-sdk-php/issues
164 [sdk-license]: http://aws.amazon.com/apache2.0/
165 [sdk-blog]: https://aws.amazon.com/blogs/developer/category/php/
166 [sdk-sample]: http://aws.amazon.com/developers/getting-started/php
167
168 [install-packagist]: https://packagist.org/packages/aws/aws-sdk-php
169 [latest-release]: https://github.com/aws/aws-sdk-php/releases
170
171 [docs-api]: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html
172 [docs-guide]: http://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html
173 [docs-api-v2]: http://docs.aws.amazon.com/aws-sdk-php/v2/api/index.html
174 [docs-guide-v2]: http://docs.aws.amazon.com/aws-sdk-php/v2/guide/index.html
175 [docs-contribution]: https://github.com/aws/aws-sdk-php/blob/master/CONTRIBUTING.md
176 [docs-migration]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_migration.html
177 [docs-signup]: https://aws.amazon.com/premiumsupport/knowledge-center/create-access-key/
178 [docs-requirements]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_requirements.html
179 [docs-installation]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_installation.html
180 [docs-quickstart]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html#getting-started
181 [docs-paginators]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_paginators.html
182 [docs-waiters]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_waiters.html
183 [docs-results]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_basic-usage.html#result-objects
184 [docs-exceptions]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_basic-usage.html#handling-errors
185 [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
186 [docs-ddbsh]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/service_dynamodb-session-handler.html
187 [docs-services]: https://aws.amazon.com/products/
188 [docs-rande]: http://docs.aws.amazon.com/general/latest/gr/rande.html
189 [docs-streamwrapper]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-stream-wrapper.html
190 [docs-s3-transfer]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-transfer.html
191 [docs-s3-multipart]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-multipart-upload.html
192 [docs-s3-encryption]: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-encryption-client.html
193 [docs-script-composer]: https://github.com/aws/aws-sdk-php/tree/master/src/Script/Composer
194
195 [aws]: http://aws.amazon.com
196 [aws-iam-credentials]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UsingIAM.html#UsingIAMrolesWithAmazonEC2Instances
197 [aws-tools]: http://aws.amazon.com/tools
198 [guzzle-docs]: http://guzzlephp.org
199 [composer]: http://getcomposer.org
200 [packagist]: http://packagist.org
201 [psr-7]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md
202 [psr-4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
203 [psr-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
204 [psr-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
205
206 [mod-laravel]: https://github.com/aws/aws-sdk-php-laravel
207 [mod-zf2]: https://github.com/aws/aws-sdk-php-zf2
208 [mod-silex]: https://github.com/aws/aws-sdk-php-silex
209 [mod-symfony]: https://github.com/aws/aws-sdk-php-symfony
210 [sns-validator]: https://github.com/aws/aws-php-sns-message-validator
211 [serverless-LAMP-stack-guide]: https://github.com/aws-samples/php-examples-for-aws-lambda
212