Saturday, 13 August 2016

Frustrating experience with AWS Beanstalk

I have used Azure's Paas services before. For a friend's website, I was trying out AWS's Paas offering today. The experience is nothing less than just frustrating. I have a fully functioning rails application. It is working fine locally. However, when I tried to upload the application using the beanstalk command line, I am seeing the following error.

ERROR: [Instance: i-002808929ac3e534b] Command failed on instance. Return code: 1 Output: (TRUNCATED)...SyntaxError: Invalid CSS after "": expected selector or at-rule, was "{"
/opt/rubies/ruby-2.3.1/bin/bundle:23:in `load'
/opt/rubies/ruby-2.3.1/bin/bundle:23:in `
Tasks: TOP => assets:precompile
(See full trace by running task with --trace).
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/ failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.

Now the complete log is not available here. You need to log into the instance and check it. However, as the lines show, it is a problem with asset pre-compilation. I tried running asset compilation locally; but I do not see this error. Interestingly, the instance created by the CLI did not allow permission for SSH. It's acceptable source was set to some other IP. It seems to me they launched their product in a hurry.