• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Aws/H03-May-2022-64,68725,741

GuzzleHttp/H03-May-2022-14,0287,980

JmesPath/H03-May-2022-2,6771,985

Psr/Http/Message/H03-May-2022-1,256105

Symfony/Polyfill/Intl/Idn/H03-May-2022-10,65910,135

CHANGELOG.mdH A D16-Jul-2021802.4 KiB9,0476,571

LICENSE.mdH A D16-Jul-20219 KiB142107

NOTICE.mdH A D16-Jul-20212.8 KiB6547

README.mdH A D16-Jul-202111.8 KiB211172

aws-autoloader.phpH A D16-Jul-2021176.5 KiB1,6781,674

README.md

1# AWS SDK for PHP - Version 3
2
3[![@awsforphp on Twitter](http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat)](https://twitter.com/awsforphp)
4[![Total Downloads](https://img.shields.io/packagist/dt/aws/aws-sdk-php.svg?style=flat)](https://packagist.org/packages/aws/aws-sdk-php)
5[![Build Status](https://img.shields.io/travis/aws/aws-sdk-php.svg?style=flat)](https://travis-ci.org/aws/aws-sdk-php)
6[![Apache 2 License](https://img.shields.io/packagist/l/aws/aws-sdk-php.svg?style=flat)](http://aws.amazon.com/apache-2-0/)
7[![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)
8[![codecov](https://codecov.io/gh/aws/aws-sdk-php/branch/master/graph/badge.svg)](https://codecov.io/gh/aws/aws-sdk-php)
9
10The **AWS SDK for PHP** makes it easy for developers to access [Amazon Web
11Services][aws] in their PHP code, and build robust applications and software
12using services like Amazon S3, Amazon DynamoDB, Amazon Glacier, etc. You can
13get started in minutes by [installing the SDK through Composer][docs-installation]
14or by downloading a single zip or phar file from our [latest release][latest-release].
15
16Jump To:
17* [Getting Started](#Getting-Started)
18* [Quick Examples](#Quick-Examples)
19* [Getting Help](#Getting-Help)
20* [Features](#Features)
21* [Contributing](#Contributing)
22* [More Resources](#Resources)
23* [Related AWS Projects](#Related-AWS-Projects)
24
25## Getting Started
26
271. **Sign up for AWS** – Before you begin, you need to
28   sign up for an AWS account and retrieve your [AWS credentials][docs-signup].
291. **Minimum requirements** – To run the SDK, your system will need to meet the
30   [minimum requirements][docs-requirements], including having **PHP >= 5.5**.
31   We highly recommend having it compiled with the cURL extension and cURL
32   7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
331. **Install the SDK** – Using [Composer] is the recommended way to install the
34   AWS SDK for PHP. The SDK is available via [Packagist] under the
35   [`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:
36   ```
37   composer require aws/aws-sdk-php
38   ```
39   Please see the
40   [Installation section of the User Guide][docs-installation] for more
41   detailed information about installing the SDK through Composer and other
42   means.
431. **Using the SDK** – The best way to become familiar with how to use the SDK
44   is to read the [User Guide][docs-guide]. The
45   [Getting Started Guide][docs-quickstart] will help you become familiar with
46   the basic concepts.
47
48## Quick Examples
49
50### Create an Amazon S3 client
51
52```php
53<?php
54// Require the Composer autoloader.
55require 'vendor/autoload.php';
56
57use Aws\S3\S3Client;
58
59// Instantiate an Amazon S3 client.
60$s3 = new S3Client([
61    'version' => 'latest',
62    'region'  => 'us-west-2'
63]);
64```
65
66### Upload a file to Amazon S3
67
68```php
69<?php
70// Upload a publicly accessible file. The file size and type are determined by the SDK.
71try {
72    $s3->putObject([
73        'Bucket' => 'my-bucket',
74        'Key'    => 'my-object',
75        'Body'   => fopen('/path/to/file', 'r'),
76        'ACL'    => 'public-read',
77    ]);
78} catch (Aws\S3\Exception\S3Exception $e) {
79    echo "There was an error uploading the file.\n";
80}
81```
82
83## Getting Help
84
85Please 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.
86
87* Ask a question on [StackOverflow](https://stackoverflow.com/) and tag it with [`aws-php-sdk`](http://stackoverflow.com/questions/tagged/aws-php-sdk)
88* Come join the AWS SDK for PHP [gitter](https://gitter.im/aws/aws-sdk-php)
89* Open a support ticket with [AWS Support](https://console.aws.amazon.com/support/home/)
90* If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-php/issues/new/choose)
91
92This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/).
93
94
95## Maintenance and support for SDK major versions
96
97For information about maintenance and support for SDK major versions and their underlying dependencies, see the following in the [AWS SDKs and Tools Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/overview.html):
98
99* [AWS SDKs and Tools Maintenance Policy](https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html)
100* [AWS SDKs and Tools Version Support Matrix](https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.html)
101
102
103### Opening Issues
104
105If 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.
106
107The 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.
108
109## Features
110
111* Provides easy-to-use HTTP clients for all supported AWS
112  [services][docs-services], [regions][docs-rande], and authentication
113  protocols.
114* Is built on [Guzzle][guzzle-docs], and utilizes many of its features,
115  including persistent connections, asynchronous requests, middlewares, etc.
116* Provides convenience features including easy result pagination via
117  [Paginators][docs-paginators], [Waiters][docs-waiters], and simple
118  [Result objects][docs-results].
119* Provides a [multipart uploader tool][docs-s3-multipart] for Amazon S3 and
120  Amazon Glacier that can be paused and resumed.
121* Provides an [Amazon S3 Stream Wrapper][docs-streamwrapper], so that you can
122  use PHP's native file handling functions to interact with your S3 buckets and
123  objects like a local filesystem.
124* Provides an [Amazon S3 Encryption Client][docs-s3-encryption] for creating and interacting with encrypted objects in your S3 buckets.
125* Provides the [Amazon DynamoDB Session Handler][docs-ddbsh] for easily scaling
126  sessions on a fast, NoSQL database.
127* Automatically uses [IAM Instance Profile Credentials][aws-iam-credentials] on
128  configured Amazon EC2 instances.
129
130## Contributing
131
132We 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 guidelines](./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.
133
134
135## Resources
136
137* [User Guide][docs-guide] – For both getting started and in-depth SDK usage information
138* [API Docs][docs-api] – For details about operations, parameters, and responses
139* [Blog][sdk-blog] – Tips & tricks, articles, and announcements
140* [Sample Project][sdk-sample] - A quick, sample project to help get you started
141* [Forum][sdk-forum] – Ask questions, get help, and give feedback
142* [Issues][sdk-issues] – Report issues, submit pull requests, and get involved
143  (see [Apache 2.0 License][sdk-license])
144* [@awsforphp][sdk-twitter] – Follow us on Twitter
145
146## Related AWS Projects
147
148* [AWS Service Provider for Laravel][mod-laravel]
149* [AWS SDK ZF2 Module][mod-zf2]
150* [AWS Service Provider for Silex][mod-silex]
151* [AWS SDK Bundle for Symfony][mod-symfony]
152* [Amazon SNS Message Validator for PHP][sns-validator] - SNS validator without requiring SDK
153* [Guzzle Version 7][guzzle-docs] – PHP HTTP client and framework
154* For Version 2 of the SDK (deprecated):
155  * [User Guide][docs-guide-v2]
156  * [API Docs][docs-api-v2]
157* [Serverless LAMP stack guide][serverless-LAMP-stack-guide] - A guide to building and deploying a serverless PHP application
158* Other [AWS SDKs & Tools][aws-tools] (e.g., js, cli, ruby, python, java, etc.)
159
160[sdk-website]: http://aws.amazon.com/sdkforphp
161[sdk-forum]: https://forums.aws.amazon.com/forum.jspa?forumID=80
162[sdk-issues]: https://github.com/aws/aws-sdk-php/issues
163[sdk-license]: http://aws.amazon.com/apache2.0/
164[sdk-blog]: https://aws.amazon.com/blogs/developer/category/php/
165[sdk-twitter]: https://twitter.com/awsforphp
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]: http://aws.amazon.com/developers/access-keys/
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
194[aws]: http://aws.amazon.com
195[aws-iam-credentials]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UsingIAM.html#UsingIAMrolesWithAmazonEC2Instances
196[aws-tools]: http://aws.amazon.com/tools
197[guzzle-docs]: http://guzzlephp.org
198[composer]: http://getcomposer.org
199[packagist]: http://packagist.org
200[psr-7]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md
201[psr-4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
202[psr-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
203[psr-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
204
205[mod-laravel]: https://github.com/aws/aws-sdk-php-laravel
206[mod-zf2]: https://github.com/aws/aws-sdk-php-zf2
207[mod-silex]: https://github.com/aws/aws-sdk-php-silex
208[mod-symfony]: https://github.com/aws/aws-sdk-php-symfony
209[sns-validator]: https://github.com/aws/aws-php-sns-message-validator
210[serverless-LAMP-stack-guide]: https://github.com/aws-samples/php-examples-for-aws-lambda
211