Installation guide

Profile your code to find performance bottlenecks
You will need to profile your application to determine the bottlenecks. This can be done using Xdebug, XHProf,
strace, and various other tools. There are many resources available on the internet to help you track down
performance problems with your application. Here are a few that we have found useful:
http://talks.php.net/show/devconf/0
http://talks.php.net/show/perf_tunning/16
Comparing SDK1 and SDK2
Software performance is very subjective and depends heavily on factors outside of the control of the SDK. The AWS
SDK for PHP is tuned to cover the broadest set of performance sensitive applications using AWS. While there may
be a few isolated cases where V1 of the the SDK is as fast or faster than V2, that is not generally true and comes
with the loss of extensibility, maintainability, persistent HTTP connections, response parsing, PSR compliance, etc.
Depending on your use case, you will find that a properly configured environment running the AWS SDK for PHP is
generally just as fast as SDK1 for sending a single request and more than 350% faster than SDK1 for sending many
requests.
Comparing batch requests
A common misconception when comparing the performance of SDK1 and SDK2 is that SDK1 is faster than SDK2
when sending requests using the "batch()" API.
SDK1 is generally not faster at sending requests in parallel than SDK2. There may be some cases where SDK1 will
appear to more quickly complete the process of sending multiple requests in parallel, but SDK1 does not retry
throttled requests when using the batch() API. In SDK2, throttled requests are automatically retried in parallel
using truncated exponential backoff. Automatically retrying failed requests will help to ensure that your application is
successfully completing the requests that you think it is.
You can always disable retries if your use case does not benefit from retrying failed requests. To disable retries, set
'client.backoff' to false when creating a client.
$client = Aws\DynamoDb\DynamoDbClient::factory(array(
'region' => 'us-west-2',
'client.backoff' => false
));
Frequently Asked Questions (FAQ)
What methods are available on a client?
The AWS SDK for PHP utilizes service descriptions and dynamic magic __call() methods to execute API operations.
Every magic method supported by a client is documented in the docblock of a client class using @method
annotations. Several PHP IDEs, including PHPStorm and Zend Studio, are able to autocomplete based on
@method annotations. You can find a full list of methods available for a web service client in the API documentation
of the client or in the user guide for that client.
For example, the Amazon S3 client supports the following operations: Creating a bucket
What do I do about a cURL SSL certificate error?
This issue can occur when using an out of date CA bundle with cURL and SSL. You can get around this issue by
updating the CA bundle on your server or downloading a more up to date CA bundle from the cURL website directly.
Simply download a more up to date CA bundle somewhere on your system and instruct the SDK to use that CA
bundle rather than the default. You can configure the SDK to use a more up to date CA bundle by specifying the
ssl.certificate_authority in a client's factory method or the configuration settings used with
Aws\Common\Aws.
Frequently Asked Questions (FAQ)
46