Release: AWS SDK for PHP 1.5.1 "Blue"

Release Notes>PHP>Release: AWS SDK for PHP 1.5.1 "Blue"
This release adds support for the Amazon DynamoDB service, Amazon SNS Notifications and Tags, Amazon SNS Short Messaging Service (SMS) endpoints and Subscription Attributes, integrates patches from GitHub, and resolves issues reported to the forums.


Submitted By: RyanP
Release Date: January 18, 2012 12:15 PM GMT
Latest Version: 1.5.1
Created On: January 18, 2012 12:15 PM GMT
Last Updated: January 18, 2012 12:15 PM GMT


Download the latest AWS SDK for PHP

New Features

Change Description

Amazon DynamoDB

Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. Using the AWS Management Console or the AWS SDKs customers can easily launch a new Amazon DynamoDB database table, scale up or down their request capacity for the table without downtime or performance degradation, and gain visibility into resource utilization and performance metrics. Amazon DynamoDB enables customers to offload the administrative burdens of operating and scaling distributed databases to AWS, so they don't have to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling.

In the AWS SDK for PHP, Amazon DynamoDB requires a default cache configuration to be set in your credential set, otherwise it will not function properly.

// Create table
$response = $dynamodb->create_table(array(
    'TableName' => $table_name,
    'KeySchema' => array(
        'HashKeyElement' => array(
            'AttributeName' => 'id',
            'AttributeType' => AmazonDynamoDB::TYPE_NUMBER
        'RangeKeyElement' => array(
            'AttributeName' => 'date',
            'AttributeType' => AmazonDynamoDB::TYPE_NUMBER
    'ProvisionedThroughput' => array(
        'ReadCapacityUnits' => 10,
        'WriteCapacityUnits' => 5

// Sleep and poll until it's created
do {
    $response = $dynamodb->describe_table(array(
        'TableName' => $table_name
while ((string) $response->body->Table->TableStatus !== 'ACTIVE');

// Add data to the table
$response = $dynamodb->put_item(array(
    'TableName' => $table_name,
    'Item' => array(
        'id'     => array( AmazonDynamoDB::TYPE_NUMBER => '1'           ), // Primary (Hash) Key
        'date'   => array( AmazonDynamoDB::TYPE_NUMBER => $current_time ), // Range Key
        'key1'   => array( AmazonDynamoDB::TYPE_STRING => 'value1'      ),
        'key2'   => array( AmazonDynamoDB::TYPE_STRING => 'value2'      ),
        'vowels' => array( AmazonDynamoDB::TYPE_STRING => 'aeiou'       )

// Read data
if ($response->isOK())
    $response = $dynamodb->get_item(array(
        'TableName' => $table_name,
        'Key' => array(
            'HashKeyElement' => array( // "id" column
                AmazonDynamoDB::TYPE_NUMBER => '1'
            'RangeKeyElement' => array( // "date" column
                AmazonDynamoDB::TYPE_NUMBER => $current_time
        'AttributesToGet' => 'vowels'

    var_dump((string) $response->body->Item->vowels->{AmazonDynamoDB::TYPE_STRING});

Auto Scaling

Support for Amazon SNS Notifications and Tags have been added to the SDK.

Amazon SNS

Support for Short Messaging Service (SMS) endpoints, as well as Subscription Attributes have been added to the SDK.

Resolved Issues

Change Description

Amazon CloudFront

Resolved an issue with disabling SSL verification.

For more information, please see: Bug ssl_verification option not respected for AmazonS3.

Amazon CloudWatch

Resolved an issue in which gzipped data was attempting to be decompressed with the deflate algorithm.

Amazon S3 SSL

Resolved an issue with disabling SSL verification.

For more information, please see: Bug ssl_verification option not respected for AmazonS3.

Amazon S3 Documentation

Resolved multiple documentation issues. (Thanks Aizat Faiz and Jason Ardell!)

For more information, please see: Documentation patch and Removed duplicate comment line.

Amazon S3 Content Parsing

Corrected an issue where calling AmazonS3->get_object() would continue to parse the content if caching was being leveraged. (Thanks Eric Caron!)

For more information, please see: XML still being parsed when use_cache_flow is false.


CFLoader now returns false for any class that it doesn't load, allowing subsequent autoloaders to attempt to handle the call. (Thanks Eric Caron!)

For more information, please see: CFLoader's autoloader method prevents other autoloaders from working.

JSON handling

Support for the handling of JSON nulls in PHP 5.2 has been improved. (Thanks David Chan!)

For more information, please see: json_last_error doesn't exist before php v 5.3.0.

SDK Compatiblility Test

The SDK compatibility test now uses ini_get() instead of get_cfg_var() and get_cfg_ini() for more accurate test results.

For more information, please see: [Bug] Compatibility test for Garbage Collector enabled should use ini_get.


Resolved an issue with passing explicit credentials without requiring a config file or a CFCredentials declaration.

For more information, please see: CFRuntime credentials handling issue.

cURL Options

Resolved an issue which causes custom cURL options to be unset from the payload when retrying.

For more information, please see: [Bug] Custom Curl Opts Lost During Retry.


Resolved an issue where AmazonS3 and AmazonCloudFront were throwing warnings in E_STRICT mode.

For more information, please see: PHP 5.2 bug in AWS SDK for PHP 1.5.x.

Known Issues

Issue Description

2GB limit for 32-bit stacks; all Windows stacks.

Because PHP's integer type is signed and many platforms use 32-bit integers, the AWS SDK for PHP does not correctly handle files larger than 2GB on a 32-bit stack (where "stack" includes CPU, OS, web server, and PHP binary). This is a well-known PHP issue. In the case of Microsoft® Windows®, there are no official builds of PHP that support 64-bit integers.

The recommended solution is to use a 64-bit Linux stack, such as the 64-bit Amazon Linux AMI with the latest version of PHP installed.

For more information, please see: PHP filesize: Return values. A workaround is suggested in AmazonS3::create_mpu_object() with files bigger than 2GB.

Amazon S3 Buckets containing periods

Amazon S3's SSL certificate covers domains that match * When buckets (e.g., my-bucket) are accessed using DNS-style addressing (e.g.,, those SSL/HTTPS connections are covered by the certificate.

However, when a bucket name contains one or more periods (e.g., and is accessed using DNS-style addressing (e.g.,, that SSL/HTTPS connection will fail because the certificate doesn't match.

The most secure workaround is to change the bucket name to one that does not contain periods. Less secure workarounds are to use disable_ssl() or disable_ssl_verification(). Because of the security implications, calling either of these methods will throw a warning. You can avoid the warning by adjusting your error_reporting() settings.

Expiring request signatures

When leveraging AmazonS3::create_mpu_object(), it's possible that later parts of the multipart upload will fail if the upload takes more than 15 minutes.

Too many open file connections

When leveraging AmazonS3::create_mpu_object(), it's possible that the SDK will attempt to open too many file resources at once. Because the file connection limit is not available to the PHP environment, the SDK is unable to automatically adjust the number of connections it attempts to open.

A workaround is to increase the part size so that fewer file connections are opened.

Exceptionally large batch requests

When leveraging the batch request feature to execute multiple requests in parallel, it's possible that the SDK will throw a fatal exception if a particular batch pool is exceptionally large and a service gets overloaded with requests.

This seems to be most common when attempting to send a large number of emails with the SES service.

Supported API Versions

The AWS SDK for PHP supports the following services and API versions:

Service API Version
Amazon CloudFront 2010-11-01
Amazon CloudWatch 2010-08-01
Amazon DynamoDB 2011-12-05
Amazon Elastic Compute Cloud (Amazon EC2) with Amazon Virtual Private Cloud (Amazon VPC) 2011-11-01
Amazon ElastiCache 2011-07-15
Amazon Elastic MapReduce (Amazon EMR) 2009-03-31
Amazon Relational Database Service (Amazon RDS) 2011-04-01
Amazon Simple Storage Service (Amazon S3) 2006-03-01
Amazon SimpleDB 2009-04-15
Amazon Simple Email Service (Amazon SES) 2010-12-01
Amazon Simple Notification Service (Amazon SNS) 2010-03-31
Amazon Simple Queue Service (Amazon SQS) 2011-10-01
Auto Scaling 2011-01-01
AWS CloudFormation 2010-05-15
AWS Elastic Beanstalk 2010-12-01
AWS Identity and Access Management 2010-05-08
AWS Import/Export 2010-06-01
AWS Security Token Service 2011-06-15
Elastic Load Balancing (ELB) 2011-11-15
©2017, Amazon Web Services, Inc. or its affiliates. All rights reserved.