4

I've been following the official Amazon documentation on deplaying to the Elastic Bean Stalk.

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python.html

and the customization environment

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html#customize-containers-format

however, I am stuck. I do not want to use the built in RDS database I want to use mongodb but have my django/python application scale as a RESTful frontend or rather API endpoint for my users.

Currently I am running one EC2 instance to test out my django application.

Some problems that I have with the Elastic Bean: 1. I cannot figure out how to run commands such as

pip install git+https://github.com/django-nonrel/django@nonrel-1.5
  1. Since I cannot install the device mongo driver for use by django I cannot run my mongodb commands.

I was wondering if I am just skipping over some concepts or just not understanding how deploying on the beanstalk works. I can see that beanstalk just launches EC2 instances and possibly need to write custom scripts or something I don't know.

I've searched around but I don't exactly know what to ask in regards to this. Top results of google are always Amazon documents which are less than helpful in customization outside of their RDS environment. I know that Django traditionally uses RDS environments but again I don't want to use those as they are not flexible enough for the web application I am writing.

TimD
  • 1,090
  • 11
  • 22

1 Answers1

2

You can create a customize AMI to your specific needs the steps are outline in the AWS documentation below. Basically you would create a custom AMI with the packages needed to host your application and then update the Beanstalk config to use your customize AMI.

Using Custom AMIs

user2040074
  • 634
  • 1
  • 5
  • 16
  • Okay thank you. I figured this would be what I would need to do. For example, if I used my current build and created an AMI I would just tell beanstalk to use that customized AMI? – TimD Apr 16 '14 at 18:45
  • Yes thats correct..All futures instances will use this new AMI if you want your existing instances to use the new customize AMI depending on the amount of instances you have and the minimum threshold you have define. For this example lets say you have define 2 minimum instances and your traffic is going via the ELB to these 2 instances you can terminate one and by default Beanstalk will replace it and once thats up you can terminate the other. Therefore you will have the existing Ec2 instances and newer instances launch from an auto-scaling policy using your customize AMI. – user2040074 Apr 16 '14 at 18:54