Release: AWS SDK for PHP 1.1

Release Notes>PHP>Release: AWS SDK for PHP 1.1
This release adds support for Amazon Elastic Load Balancing, Amazon Relational Database Service, and Amazon Virtual Private Cloud. It adds the custom origin feature to Amazon CloudFront, and the multipart upload feature to Amazon S3. It improves cURL error reporting, improves Amazon S3 seeking and streaming options, removes 1000-entry limits for certain operations, and resolves issues reported on the AWS forums.

Details

Submitted By: RyanP@AWS
Release Date: November 10, 2010 8:00 AM GMT
Latest Version: 1.1
Created On: November 10, 2010 10:47 PM GMT
Last Updated: November 10, 2010 10:47 PM GMT
Feature Description

Amazon ELB

Support for the Amazon Elastic Load Balancing Service has been added to the SDK.

For more information, please see: Elastic Load Balancing.

Amazon RDS

Support for the Amazon Relational Database Service has been added to the SDK.

For more information, please see: Amazon Relational Database Service.

Amazon VPC

Support for the Amazon Virtual Private Cloud has been added to the SDK.

For more information, please see: Amazon Virtual Private Cloud.

Amazon S3 Multipart Upload

Support for the Amazon S3 multipart upload feature has been added to the SDK. This feature enables developers upload large objects in a series of requests for improved upload reliability.

For more information, please see: Introducing Amazon S3 Multipart Upload.

Amazon CloudFront Custom Origin

Support for the Amazon CloudFront custom origin feature (2010-11-01 release) has been added to the SDK. This feature enables developers to use custom domains as sources for Amazon CloudFront distributions.

$cdn = new AmazonCloudFront();

$cdn->create_distribution('http://www.example.com', 'CallerReference', array(
    'Comment' => 'This is a custom origin.',
    'OriginProtocolPolicy' => 'match-viewer'
));

For more information, please see: Announcement: Amazon CloudFront announces General Availability, Support for Custom Origins, and Service Level Agreement.

Amazon S3 Streaming Improvements

The AmazonS3 class now supports reading from and writing to open file resources in addition to the already-supported file system paths.

Additionally, you can now seek to a specific byte-position within a file or file resource and begin streaming from that point when uploading or downloading objects.

$s3 = new AmazonS3();

$file_resource = fopen('large_video.mp4', 'r');

$s3->create_object('my-bucket', 'large_video.mp4', array(
    'fileUpload' => $file_resource
));

For more information, please see: Suggestion for the PHP SDK concerning streaming.

Resolved Issues and Enhancements

Issue Description

1000-entry limits removed

The methods get_bucket_filesize(), get_object_list(), delete_all_objects(), delete_all_object_versions() and delete_bucket() are no longer limited to 1000 entries and will work correctly for all entries.

For more information, please see: get_bucket_filesize only returns filesize for first 1000 objects (v1.0.1).

Path-style URIs for eu-west

In Amazon S3, requests directly to the eu-west endpoint must use the path-style URI. The set_region() method now takes this into account.

For more information, please see: EU Region DNS problem.

Issues with get_object_list()

As of version 1.0.1, CFSimpleXML extends SimpleXMLIterator instead of SimpleXMLElement. This prevented the __call() magic method from firing when get_object_list() was used.

For more information, please see: AmazonS3 get_bucket_object_count, S3: get_object_list() fatal error and How to use Prefix with "get_object_list"?.

Signing port numbers

When using the SDK with 3rd-party API-compatible services, the SDK omitted the port number from the string to sign for query-based services. Port numbers other than 80 and 443 are now part of the signature.

For more information, please see: Bug in authenticate in sdk.class.php.

UTF-8 characters via HTTP POST

When putting UTF-8 characters via HTTP POST, a SignatureDoesNotMatch error would be returned. Specifying the character set in the Content-Type header resolved this issue.

For more information, please see: SignatureDoesNotMatch with utf-8 in SimpleDB and Amazon SimpleDB SignatureDoesNotMatch error when putting UTF-8 Characters via a HTTP POST.

Issues with get_object_metadata()

Previously, if the get_object_metadata() method was called on a non-existent object, metadata for the alphabetically-next object would be returned. This issue has been resolved.

Also, the response from the get_object_metadata() method now includes all supported HTTP headers, including metadata stored in x-amz-meta- headers.

For more information, please see: S3 get_object_metadata() problems.

Class constants in examples

Class constants in the usage examples for the reference documentation now use the class name instead of an instance of the class. This makes the usage examples compatible with PHP 5.2.x.

For more information, please see: Bug in Samples.

Documentation

The preauth option for the get_object_list() method has been removed from the reference documentation as it is not supported.

SimpleXML enhancements

The to_string() and to_array() methods have been added to the CFSimpleXML class.

Improved reporting for cURL errors.

Requests that have errors at the cURL level now throw exceptions containing the error message and error code returned by cURL.

Amazon SQS Queue ARNs

The get_queue_arn() method has been added to the AmazonSQS class, which converts a queue URI to a queue ARN.

Compatibility Test

Fixed the URIs for the Getting Started Guide links.

Amazon IAM

Removed the set_region() method as IAM only supports a single endpoint.

Complete Changelog

More thorough notes can be found in CHANGELOG.md, bundled with the SDK.

Supported API Versions

The AWS SDK for PHP supports the following API versions:

Service API Version
Amazon CloudFront 2010-11-01
Amazon CloudWatch 2009-05-15
Amazon EC2 (with Amazon VPC) 2010-08-31
Amazon ELB 2010-07-01
Amazon IAM 2010-05-08
Amazon RDS 2010-07-28
Amazon S3 2006-03-01
Amazon SimpleDB 2009-04-15
Amazon SNS 2010-03-31
Amazon SQS 2009-02-01

Migration Guide

From Release Notes

1.0.x

You can simply replace the 1.0.x SDK package with the current release.

CloudFusion 2.5

A migration guide for customers wishing to upgrade from CloudFusion 2.5 to the AWS SDK for PHP is located at http://aws.amazon.com/articles/4263

©2017, Amazon Web Services, Inc. or its affiliates. All rights reserved.