Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Ubuntu 14.04 on AWS Elastic Beanstalk for a Python Django app

I want to ensure that the development environment to work just the same as the production environment. This is to minimise "it works for me" finger-pointing.

Hence my team chose Ubuntu 14.04 as the operating system.

We also want to deploy on AWS.

As I was running through the QwikLabs example on using Elastic Beanstalk, I realized that there is no choice to select Ubuntu 14.04.

enter image description here

enter image description here

How do I go about deploying a Django app on a AWS EC2 instance that is running on Ubuntu 14.04?

Thank you.

like image 321
Kim Stacks Avatar asked May 05 '15 05:05

Kim Stacks


2 Answers

You need to set up a custom platform then tell Elastic Beanstalk to use that platform at creation with eb create -p YourPlatformARN.

To confirm, within the linked docs, Ubuntu is supported through their custom platform service: "... the supported operating systems—Ubuntu, RHEL, or Amazon Linux ..."

like image 126
TheGrimmScientist Avatar answered Oct 15 '22 23:10

TheGrimmScientist


AWS limits the operating systems that run under Elastic Beanstalk, as it is Platform as a Service. To get full flexibility on operating systems and configuration, you'd need to use EC2.

There are two suboptimal workarounds, though:

  • use a Docker instance that is running Ubuntu
  • use this complicated hack to run Ubuntu in EB
like image 28
tedder42 Avatar answered Oct 15 '22 23:10

tedder42