Failed to deploy elasticbeanstalk application? "Unsuccessful command execution on instance id(s) 'i-********'. Aborting the operation."

Posted by Matt Bryson on 19-Oct-2015 11:20:03

Sometimes EB fails to deploy and times out with a generic error:

Unsuccessful command execution on instance id(s) 'i-********'. Aborting the operation.

As of yet there is no clean way to get out of this, but here are the top 3 ways that we have got it to work - depending on your needs...

Read More

Topics: EC2, AWS, Deployment, EB (Elastic Beanstalk), Elasticbenastalk

How to get Git SHA in an Elastic Beanstalk App (and set other dynamic env vars at deployment)

Posted by Matt Bryson on 18-May-2015 08:57:28

As part of our deployment process, we include the short git SHA as a build number against our SemVer version number.

We wanted this available in our application UI to help identify running versions. Easy I thought, Beanstalk sets this as the Version Label when deploying, so we should be able to access that from the environment vars in PHP.

Unfortunately not, this is one of the many EB values you cant easily get to. After a lot of failed attempts, here is how we managed it as a one-liner in the .ebextensions

Read More

Topics: PHP, EC2, AWS, Deployment, EB (Elastic Beanstalk), Apache

Compiling phantomJS 2.0 for AWS EC2 linux image

Posted by Matt Bryson on 17-Apr-2015 11:30:08

Back in Feb I wrote about how to compile phantomJS 2.0.0 for linux, using centOS as the build machine. However, the resulting bin files are not portable across all linux distros, hence why the official binaries aren't out yet.

If you need to run phantomJS on one of the AWS machine images, here is how we compiled it on AWS.

Read More

Topics: PhantomJS, EC2, AWS, CentOS, Linux, Bash

Shellshock Bash Bug : How to patch Bash on AWS EC2 deployed with Elastic Beanstalk

Posted by Matt Bryson on 26-Sep-2014 10:18:02

In response to the ShellShock bug, we tried to patch all our AWS EC2 servers following this security bulletin... but it didn't work.

Turns out that the instructions in the AWS bulletin don't apply to Elastic Beanstalk deployed servers. After some searching, we found the answer.

Read More

Topics: EC2, AWS, yum, CentOS, EB (Elastic Beanstalk), Linux, Bash, Apache

AWS Elastic Beanstalk Deployment Command Timeouts (and request logs fails...)

Posted by Matt Bryson on 09-Sep-2014 15:09:02

If your AWS EB deployment suddenly started failing with the following:

Update environment operation is complete, but with command timeouts. Try increasing the timeout period. For more information, see troubleshooting documentation.

And you find that trying to pull the logs also fails, it might be the same issue we recently had.

Read More

Topics: EC2, AWS, EB (Elastic Beanstalk)