Take the 2-minute tour ×

I am in search of how to include the Boto library in an Elastic Beanstalk instance. I was under the impression I had to specify it in .ebextensions. Unfortunately, this doesn't seem to work (see below).


        Flask: []
        Boto: []
...AWS key redacted...


import boto
from boto.s3.connection import S3Connection
from boto.s3.key import Key

Error message: ImportError: No module named boto

Am I missing anything in the config file? Is there additional things I need to do?

share|improve this question

2 Answers 2

The package name of boto is lower case in fact, so adjusting that might already solve your problem.

Alternatively you might want to try the apparently recommended way for Customizing and Configuring a Python Container via the typical requirements.txt file and pip instead, see 2):

Create a requirements.txt file and place it in the top-level directory of your source bundle. A typical python application will have dependencies on other third-party Python packages. In Python, pip is the standard way of installing packages. Pip has a feature that allows you to specify all the packages you need (as well as their versions) in a single requirements file. For more information about the requirements file, go to Requirements files. The following is an example requirements.txt file for Django.


So in your case that might currently be:


This is also illustrated like so in Deploying a Python Application to AWS Elastic Beanstalk Using the Elastic Beanstalk Console.

share|improve this answer

The library 'boto' is installed by default on beanstalk's AMI.

If you're using the default elastic beanstalk role (IAM), then you need not put those sensitive-information like keys on your config.

Something like this just works directly:

# .ebexetensions/boto-testing.config
    command: python -c "import boto;boto.connect_s3().get_bucket('my-private-bucket').get_key('secretfolder/secretfile.txt').get_contents_to_filename('/path/to/save/it');"
share|improve this answer

Your Answer


