Skip to content

Instantly share code, notes, and snippets.

@jeremeamia
Last active August 29, 2015 14:05
Show Gist options
  • Save jeremeamia/4ba52a84fe7db0a04252 to your computer and use it in GitHub Desktop.
Save jeremeamia/4ba52a84fe7db0a04252 to your computer and use it in GitHub Desktop.
Minimal AWS SDK Build

Minimal AWS SDK Build

The AWS SDK for PHP provides API access to 44 of the services offered by Amazon Web Services. It does so by leveraging existing libraries like Guzzle (HTTP client and web service client framework) and the Symfony Event Dispatcher. The best way to install the SDK is using Composer, which helps you install and manage the SDK's dependencies.

However, if you really want to trim down the SDK code for a specific reason, you can download the source of the SDK, and its dependencies using the aws.zip, and remove the parts you don't need. Here is how to do it:

  1. Follow the instructions in the user guide for Installing Via Zip.
  2. Unzip aws.zip.
  3. If you are not using caching features, delete the Doctrine directory.
  4. If you are not using logging features, delete the Monolog and Psr directories.
  5. Open the Aws directory. You must keep Common and whatever services you plan to use (e.g., S3).
  6. Include the SDK using the aws-autoloader.php as instructed in the link from step #1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment