Skip to content
Official repository of the AWS SDK for PHP (@awsforphp)
PHP Other
  1. PHP 99.2%
  2. Other 0.8%
Branch: master
Clone or download

Latest commit


Type Name Latest commit message Commit time
Failed to load latest commit information.
.changes Update models for release May 22, 2020
.github Remove dry-run flag from SIC action (#2019) May 19, 2020
build Add custom retry handling for github release artifact uploads (#1977) Mar 3, 2020
docs Correct name of instance metadata service (#1974) Mar 3, 2020
features Retry enhancements (#1988) Mar 31, 2020
src 3.138.7 release May 22, 2020
tests S3 dualstack partition fix (#2021) May 20, 2020
.gitattributes Update .gitattributes (#1949) Jan 16, 2020
.gitignore Remove PHP CS cache file and add to gitignore Jul 2, 2019
.travis.yml Retry enhancements (#1988) Mar 31, 2020 3.138.7 release May 22, 2020 Static analysis & Travis updates (#1861) Aug 1, 2019 Initial commit Jun 29, 2012
Makefile use --suite for smoke tests (#1802) May 28, 2019 Merge branch 'v3' into v3-staging May 27, 2015 Update Readme with specific Composer install command (#1658) Oct 24, 2018 Added docs for S3 Multipart Uploader and updated Migration Guide. May 22, 2015
behat.yml auto assume role (#1804) May 30, 2019
codecov.yml Update Travis to send coverage for optimal and lowest settings of PHP… Jan 15, 2018
compatibility-test.php Move required dependencies to Composer `require` (#1342) Aug 22, 2017
composer.json Allow Guzzle 7 (#1940) Jan 3, 2020
phpstan.neon PHP 7.4 fixes round 2 (#1917) Dec 4, 2019
phpunit.xml.dist PHPUnit coverage for functions.php (#1268) May 2, 2017

AWS SDK for PHP - Version 3

@awsforphp on Twitter Total Downloads Build Status Apache 2 License Gitter codecov

The AWS SDK for PHP makes it easy for developers to access Amazon Web Services in their PHP code, and build robust applications and software using services like Amazon S3, Amazon DynamoDB, Amazon Glacier, etc. You can get started in minutes by installing the SDK through Composer or by downloading a single zip or phar file from our latest release.


  • User Guide – For both getting started and in-depth SDK usage information
  • API Docs – For details about operations, parameters, and responses
  • Blog – Tips & tricks, articles, and announcements
  • Sample Project - A quick, sample project to help get you started
  • Forum – Ask questions, get help, and give feedback
  • Issues – Report issues, submit pull requests, and get involved (see Apache 2.0 License)
  • @awsforphp – Follow us on Twitter

Getting Help

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.

Opening Issues

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 reduced repro case when appropriate, too.

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.


Getting Started

  1. Sign up for AWS – Before you begin, you need to sign up for an AWS account and retrieve your AWS credentials.
  2. Minimum requirements – To run the SDK, your system will need to meet the minimum requirements, including having PHP >= 5.5. We highly recommend having it compiled with the cURL extension and cURL 7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
  3. Install the SDK – Using Composer is the recommended way to install the AWS SDK for PHP. The SDK is available via Packagist under the aws/aws-sdk-php 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:
    composer require aws/aws-sdk-php
    Please see the Installation section of the User Guide for more detailed information about installing the SDK through Composer and other means.
  4. Using the SDK – The best way to become familiar with how to use the SDK is to read the User Guide. The Getting Started Guide will help you become familiar with the basic concepts.

Quick Examples

Create an Amazon S3 client

// Require the Composer autoloader.
require 'vendor/autoload.php';

use Aws\S3\S3Client;

// Instantiate an Amazon S3 client.
$s3 = new S3Client([
    'version' => 'latest',
    'region'  => 'us-west-2'

Upload a file to Amazon S3

// Upload a publicly accessible file. The file size and type are determined by the SDK.
try {
        'Bucket' => 'my-bucket',
        'Key'    => 'my-object',
        'Body'   => fopen('/path/to/file', 'r'),
        'ACL'    => 'public-read',
} catch (Aws\S3\Exception\S3Exception $e) {
    echo "There was an error uploading the file.\n";

Related AWS Projects

You can’t perform that action at this time.