Recently some of our Elastic Beanstalk deployments suddenly started failing. It turns out it was a change to EB's configuration validation which caused some misleading error messages.
Yesterday, iDetailAid attended the Amazon Web Services (AWS) Summit in London's ExCeL centre, along with 6,000 other customers and partners of Amazon.
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...
We use PhantomJS to auto generate images of user generated content. All was fine, until we entered the Asian markets.
It was not the usual black squares issue that you can get with Phantom, it just had spaces where the Korean characters should have been.
The font itself was loading fine, as Latin characters were in the correct type face.
After following lots of posts about installing font support packs on linux, and non of them working, I finally got it running on
sudo yum groupinstall "Korean Support" "Chinese Support" "Japanese Support"
Had a very odd issue with CSS files being loaded, but the css not being applied (and any @imports not loading either).
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
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.
Turns out that the instructions in the AWS bulletin don't apply to Elastic Beanstalk deployed servers. After some searching, we found the answer.
UPDATE : EB Cli tools v3 now supports multiple aws profiles
AWS makes it very simple to push to different environments of an application, but what if you need to push to a completely separate AWS account?
It's not really possible, but you can shoehorn it with the following set up....
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.