AWS SDK for PHP

Official AWS SDK for using Amazon Web Services from PHP applications

SDK
Composer
v3.393.1
6,200stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
97/100Excellent
Development Activity100
Maintenance96
Community92
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture85
Code Quality87
Innovation65
Learning Curve68

The AWS SDK for PHP is the official client library for calling Amazon Web Services (S3, EC2, DynamoDB, and hundreds of other services) from PHP applications. Service clients and their methods are generated from AWS API models, so the SDK stays in sync with AWS’s full service surface as new APIs and features ship.

Built on Guzzle for HTTP transport, it provides consistent patterns for authentication (including IAM and STS-based credential providers), pagination (waiters and paginators), retries, and error handling across every AWS service it wraps, making it the standard way to integrate AWS into PHP codebases.

What You Get

  • Generated PHP clients for essentially every AWS service, each following the same client/command pattern
  • Multiple credential provider chains (environment, shared config, IAM role, STS assume-role)
  • Built-in retry/backoff handling and request signing (SigV4) for all service calls
  • Waiters and paginators for polling long-running operations and iterating large result sets
  • A high-level S3 MultipartUploader/Downloader and DynamoDB session handler for common heavy-lifting tasks

Common Use Cases

  • Uploading/downloading files to and from Amazon S3 from a PHP application
  • Reading and writing items to DynamoDB tables from application backends
  • Sending messages through SQS/SNS or invoking Lambda functions from PHP services
  • Managing EC2, IAM, or other infrastructure resources programmatically from deployment scripts
  • Storing PHP session data in DynamoDB via the SDK’s built-in session handler

Under The Hood

Architecture - The SDK generates one namespace per AWS service under src/ (e.g. S3, DynamoDb, Ec2), each exposing a <Service>Client built from shared machinery in Api, Signature, Credentials, and Handler namespaces, so every service client is produced from the same JSON API models and code-generation pipeline rather than hand-written per service. Tech Stack - Built on Guzzle (guzzlehttp/guzzle, psr7, promises) for HTTP transport, jmespath.php for response querying, aws/aws-crt-php for the AWS Common Runtime bindings (checksums, signing), and PHP 8.1+ as the minimum supported version. Code Quality - Over 300 PHP test files under tests/ cover credential resolution, signing, retries, and per-service behavior, complemented by Behat feature tests for higher-level integration scenarios and PHPStan static analysis configured via phpstan.neon. API Design - Every service client follows the identical $client->operationName($args) / Aws\Result pattern regardless of which of the hundreds of AWS services is being called, which lowers the learning curve once the pattern is learned but still requires consulting per-service docs for the specific parameters each of hundreds of operations accepts.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search