I'm pleased to be able to tell you that AWS Elastic Beanstalk now supports PHP and Git deployment.
Elastic Beanstalk and PHP
AWS Elastic Beanstalk makes it easy for you to quickly deploy and manage applications in the AWS cloud. You simply upload your application, and Elastic Beanstalk automatically handles all of the details associated with deployment including provisioning of EC2 instances, load balancing, auto scaling, and application health monitoring. Even though it does all of this for you, you retain full control over the AWS resources powering your application and you can access them at any time if necessary. There is no additional charge for Elastic Beanstalk - you pay only for the AWS resources needed to run your applications. AWS Elastic Beanstalk supports PHP applications that run on the familiar Apache HTTP server and PHP 5.3. AWS Elastic Beanstalk also supports Java web applications running on Apache Tomcat 6 and 7.
Under the hood, Elastic Beanstalk leverages AWS services such Amazon EC2, Elastic Load Balancing and Auto Scaling to provide a highly reliable, scalable and cost effective infrastructure for PHP applications. To get started, you can use the AWS Management Console or the Elastic Beanstalk command line tools to create applications and environments.

Git-Based Deployment
The newly released Git interface provides faster deployments based on the popular Git version control system. You can now set up your Git repositories to directly deploy changes to your AWS Elastic Beanstalk environments. Git speeds up deployments by only pushing your modified files to AWS Elastic Beanstalk. In seconds, PHP applications get updated on a set of Amazon EC2 instances. To learn more about how to leverage Git deployment, go to “Deploying PHP Applications Using Git” in the AWS Elastic Beanstalk Developer Guide.
Counting objects: 1035, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1015/1015), done.
Writing objects: 100% (1035/1035), 3.84 MiB | 229 KiB/s, done.| 229 KiB/s
Total 1035 (delta 72), reused 0 (delta 0)
remote:
To https://<url>.us-east-1.amazonaws.com/repos/phptestapp/phptestenv
683a95c..f8caebc master -> master
If you make a change to a configuration file in your application, Git pushes the incremental changes to Elastic Beanstalk and your deployment completes in seconds:
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 287 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote:
To https://<url>.us-east-1.amazonaws.com/repos/phptestapp/phptestenv
c24a736..4df4dad master -> master
And More
AWS Elastic Beanstalk allows you to directly modify both the infrastructure and software to match the requirements of your applications. You can connect your PHP applications to any database of your choice. If your application needs a MySQL database, Amazon RDS provides a highly available and scalable MySQL database and frees you from time-consuming database administration tasks. For a limited time, Amazon RDS is offering a 60-day free trial to new Amazon RDS customers. To learn more about your eligibility for the 60-day free trial and to sign up, visit aws.amazon.com/rds/free-trial. If you’re looking for a database that offers fast and predictable performance with seamless scalability, use the AWS SDK for PHP to access the fully managed Amazon DynamoDB NoSQL database service.
As a PHP developer myself, I can’t wait to start using the new PHP runtime and super fast Git deployment to manage my PHP applications on AWS. To learn more about AWS Elastic Beanstalk, go to the AWS Elastic Beanstalk Developer Guide.
-- Jeff;
P.S: We are hiring software development engineers and product managers. If you are passionate about building the best developer experience, get in touch with us at aws-elasticbeanstalk-jobs@amazon.com.


This is really really really cool... I can't wait to actually get something deployed with this!
Posted by: Andrewwatson | March 20, 2012 at 08:23 PM
I've just started using various AWS services. It's awesome how powerful and easily accessible AWS is. Thank you for your continued improvement of already incredible services.
Posted by: Gary | March 20, 2012 at 10:42 PM
Really happy to have this. We finally built a system that handled this internally (deploying new versions via Git to EC2 instances without having to touch each instance, but it was held together with duct tape and bubble gum, so we're happy to have it built into EB now. AWS is awesome!
Posted by: Alex Smith | March 20, 2012 at 11:15 PM
Hey! Nice Work! I can't see though if you're supporting PHP 5.4. If you don't, when will we see it?
Regards!
Posted by: Eric Herrmann | March 21, 2012 at 01:58 AM
great news
Posted by: Roch | March 21, 2012 at 03:19 AM
This is awesome! Can't wait to try it.
Posted by: Arthur Wiebe | March 21, 2012 at 05:31 AM
This really is awesome, we were just about to release a PHP project but were concerned about how to deploy in AWS, Now Elastic Beanstalk is at Rescue to speedup our deployment process with new code updates.
Posted by: sangram anand | March 21, 2012 at 09:03 AM
I'm really liking this new way of deploying PHP Applications in to the cloud. My one question is in the Beanstalk Containers Document Root i'm unsure what to put there. Is that the absolute path to the apache web root(ie: /var/www/html/) or is it just /html?
Posted by: Steve B | March 21, 2012 at 10:46 AM
Hi Steve, you want to use the relative path (/html).
Posted by: Jeff Barr | March 21, 2012 at 09:13 PM
how are file upload handled?
Posted by: Allain Lalonde | March 22, 2012 at 03:20 AM
Allain, you can handle them in the usual way, by accepting a POST from a form. You could upload the data to Amazon S3 or DynamoDB as appropriate.
Posted by: Jeff Barr | March 22, 2012 at 05:53 AM
I'm unclear how sessions will work in this environment. With automatic load balancing and multiple instances I'm thinking that $_SESSION will no longer work without a custom handler. Now, if beanstalk PHP was configured to store sessions in DynamoDb that would be awesome.
Posted by: Steve Morris | April 14, 2012 at 08:23 AM
There are only a few more missing pieces that would make Elastic Beanstalk almost perfect:
* many projects have to run custom build scripts during a deploy so some kind of configuration file to setup these built-scripts is needed
* these built-processes might have custom dependencies or need custom tools (so a way is needed to install them on the instance during the bootstrap process)
* it should be possible to configure and run worker processes (we for example run a shell script that processes files that have been uploaded by the user), this script also has a few custom dependencies and needs custom php modules
* it would be cool if it was possible to run multiple "apps" in one "environment". that would allow to run smaller projects (or staging projects) very cost efficient on one machine
Posted by: Joshua | April 24, 2012 at 12:49 PM
It would be great to extend this service to other languages like Python (thought wsgi)
Posted by: Roberto | April 27, 2012 at 03:34 AM
voting up the comments of Joshua.
Would be really pleased to see support for custom deploy hooks
Posted by: Pieter Soudan | May 04, 2012 at 03:00 AM
Hi jeff
Can a php deployed app connect to a sql server rds database ? If yes what would be the connection string ?
Best Regards
FM
Posted by: Francois Martinez | May 11, 2012 at 11:22 PM