Release: AWS SDK for PHP 1.5.2 "Copland"

Release Notes>PHP>Release: AWS SDK for PHP 1.5.2 "Copland"
This release adds support for Amazon S3 Object Expiration, Auto Scaling, and resolves issues reported to GitHub and the forums.

Details

Submitted By: RyanP
Release Date: February 2, 2012 7:07 AM GMT
Latest Version: 1.5.2
Created On: February 2, 2012 7:07 AM GMT
Last Updated: February 2, 2012 7:07 AM GMT

Download

Download the latest AWS SDK for PHP

New Features

Change Description

Amazon S3

Support for Amazon S3 Object Expiration has been added to the SDK.

Auto Scaling

Support for Auto Scaling Resource Tagging has been added to the SDK.

Resolved Issues

Change Description

AmazonS3 Multi-Object Delete

Resolved an issue where delete_all_objects() and delete_all_object_versions() was being limited to 1000 items. In-turn, this fix also resolved an issue where delete_bucket() would fail to delete a bucket with the "force" option enabled if the bucket contained more than 1000 items.

For more information, please see: Can't remove objects from S3 bucket.

AmazonS3 JSON Parsing

Resolved an issue where JSON documents stored in Amazon S3 would be parsed into a native PHP object when retrieved.

For more information, please see: get_object query does not always return the same content type.

Amazon CloudFront

Resolved an issue where the set_distribution_config() method could fail to satisfy an API constraint when using a custom origin server. (Thanks Zoxa!)

For more information, please see: Fixing Issue with set_distribution_config.

CA Root Certificates

The bundled set of CA Root Certificates have been updated to version 1.81 (2012-01-17).

For more information, please see: SSL Cert on PHP SDK 1.5.0.1.

Autoloader

Resolved an issue in the autoloader where the matching logic was too aggressive in certain cases, causing subsequent autoloaders to never trigger.

For more information, please see: [Bug] SDK Autoloader Interferes with PHPExcel Autoloader and AWSSDKforPHP/authentication/swift_transport_esmtp_signature_handler.class.p.

S3StreamWrapper

Support for multiple stream wrappers (e.g., one per region) with separate pseudo-protocols has been added to the SDK. Also, writes to Amazon S3 are now buffered resolving issues with pushing more than 8k of data at a time.

For more information, please see: Stream Wrapper need a buffer !.

JSON Handling

Some AWS services return JSON documents instead of XML in their responses. In an effort to provide consistency across the SDK, these JSON documents are transliterated into CFSimpleXML objects.

This release adds support for a far more robust JSON-to-XML transliterator. Among the issues that this resolves, encoded characters (e.g., ampersands) are now handled correctly.

For more information, please see: get_object query does not always return the same content type.

Caching Exceptions

Formerly, attempting to cache to a file system location that didn't exist or was not writable by the PHP process would fail silently. This behavior has been changed to throw a CacheFile_Exception.

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 *.s3.amazonaws.com. When buckets (e.g., my-bucket) are accessed using DNS-style addressing (e.g., my-bucket.s3.amazonaws.com), those SSL/HTTPS connections are covered by the certificate.

However, when a bucket name contains one or more periods (e.g., s3.my-domain.com) and is accessed using DNS-style addressing (e.g., s3.my-domain.com.s3.amazonaws.com), 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 2010-08-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
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.