We recently moved to Amazon cloud services at my work place, and it has been both interesting and fun to say the least. I started changing some of our old Java
and PHP applications to use the AWS services such SQS, SES,S3 and etc, it has been fun and games with a lot of trial and errors and I am hoping to share all that I have learnt in that process.
For this post I will focus on getting the PHP environment ready for AWS.
1. PHP requirements
Your PHP environment needs to conform to the following requirements before you can start using the SDK:
- PHP 5.2 or newer (5.2.14 or latest 5.3.x highly recommended).
- Including SimpleXML, JSON, PCRE and SPL.
- cURL PHP extension (compiled with the OpenSSL libraries for HTTPS support).
- Ability to read from, and write to, the file system via file_get_contents() and file_put_contents().
You can get more details from this page: http://aws.amazon.com/articles/4261?_encoding=UTF8&jiveRedirect=1
2. Download the AWSSDKforPHP
You can download the AWSSDKforPHP by following the link here and extract it to your local development directory e.g. /var/www/aws .
There are other options you can use to get the latest version of the sdk:
Once you have installed the SDK, e.g. /var/www/aws , navigate to http://localhost/aws/sdk-1.5.14/_compatibility_test/sdk_compatibility_test.php through your browser and make sure that your environment passes the test.
3. AWS Credentials
The SDK requires that you use your Amazon AWS credentials for using all the service it covers, you can get your accounts credentials from this link or you can register for a new account which is very easy, all they require is your credit card last I checked.
That is all for now folks, I will explore using AWS SQS service in the post – happy coding.