5
votes

I recently set up a new application in Elastic Beanstalk and created an environment using python. I want to use this environment to host a small Django web app I made using python 2.7 and Django 1.11. However, when I set up the environment, it defaulted to python 3.6 and for some reason the option to change the configuration is disabled.

Does anyone know why it is disabled and how I can change this configuration?

disabled configuration button

2
EB will not change from Python 2 <-> 3. This is considered a platform update. You cannot perform a platform update between configurations. docs.aws.amazon.com/elasticbeanstalk/latest/dg/…John Hanley
Ok that makes sense. I went ahead and made a whole new environment with the correct version of Python.Emma F.

2 Answers

4
votes

You should be able to use the AWS CLI (or the EBCLI) to update your environment with the platform of choice:

aws elasticbeanstalk update-environment \
  --environment-name ENVIRONMENT_NAME \
  --solution-stack-name PYTHON_2_7_SOLUTION_STACK \
  --region REGION_NAME

where,

PYTHON_2_7_SOLUTION_STACK --> the solution stack you'd like to use. Find the latest one in the Python 2.7 series here.

1
votes

Confirmed. I was just able to downgrade from Python 3.6 to 3.4.

First, list the available solution stacks:

aws elasticbeanstalk list-available-solution-stacks

Then, update your environment (below is an example of downgrading to 2.7):

aws elasticbeanstalk update-environment \
--environment-name 'your-env-name-here' \
--solution-stack-name '64bit Amazon Linux 2018.03 v2.7.6 running Python 2.7'