[AWS] Development environment version that tried to build a Python environment with eb [Elastic Beanstalk]

AWS seems to like eb. But I never used eb

http://docs.aws.amazon.com/ja_jp/elasticbeanstalk/latest/dg/create-deploy-python-apps.html It is a record that I actually worked along with Prepared to continue throwing until everything is done

Preparing to deploy Flask application by building Python environment with eb Flask application deployment that tried to build Python environment with eb

Prerequisites

  1. Python 2.7 or 3.4
  1. The pip utility for your version of Python. It is used to install and list project dependencies so that Elastic Beanstalk can determine how to set up your application environment.
  1. virtualenv package. It is used to create an environment for developing and testing applications. This allows Elastic Beanstalk to replicate that environment without installing extra packages that your application does not need.
  1. awsebcli package. It is used to initialize the application with the files needed for deployment by Elastic Beanstalk.
  1. A working ssh installation. It is used to connect to a running instance when you need to investigate or debug your deployment.

... apparently ... Put simply --Pip can be used --python uses 2.7 / 3.4 --virtualenv installed --Awscli command can be used --You can use ssh

That is. I use a Mac.


Virtual environment settings

I was allowed to refer to other than the document Reference: Try using virtualenv that can build a virtual environment of Python

command


virtualenv -p python2.7 /tmp/eb_python_app

result


Running virtualenv with interpreter /Users/****/.pyenv/shims/python2.7
New python executable in /Users/yuki/eb_test_app/bin/python
Installing setuptools, pip, wheel...done.

Verification


ls  /Users/***/eb_test_app/

result


bin			lib
include			pip-selfcheck.json

The environment has been installed.

Start virtual environment

Change to the directory you created

command


cd /Users/***/eb_test_app/

Verification


pwd

result


/Users/****/eb_test_app

command


source bin/activate

If (directory name)% is added to the beginning of the console line, it is running.


Set up a python project for eb

Verification


pwd

result


/Users/****/eb_test_app

command


pip freeze >requirements.txt

pip freezeThe command displays the currently installed packages. You can tell eb the environment by writing it in the text "requirements.txt" that eb reads.

At present, it seems that nothing is installed, so even if you look at the text, nothing will come out.

Example

command


pip install Djangp

Verification


pip freeze

result


Django==1.9.5

Like this. If something is installed, that information will be output.

The above is how to create a development environment

Recommended Posts

[AWS] Development environment version that tried to build a Python environment with eb [Elastic Beanstalk]
[AWS] Flask application deployment preparation edition that tried to build a Python environment with eb [Elastic Beanstalk]
I tried to build a Mac Python development environment with pythonz + direnv
How to build a python2.7 series development environment with Vagrant
[Python] Build a Django development environment with Docker
Build a machine learning application development environment with Python
I wrote a script to create a Twitter Bot development environment quickly with AWS Lambda + Python 2.7
[Python] A memo that I tried to get started with asyncio
Easily build a development environment with Laragon
I want to build a Python environment
Build a modern Python environment with Neovim
Build a C language development environment with a container
Build a WardPress environment on AWS with pulumi
Build Python development environment with Visual Studio Code
Build a python environment with ansible on centos6
Create a python3 build environment with Sublime Text3
Build a Python development environment on your Mac
Build a Python environment with OSX El capitan
Quickly build a Python Django environment with IntelliJ
Build a Python machine learning environment with a container
Build a Python development environment on Raspberry Pi
Build a python execution environment with VS Code
Get a quick Python development environment with Poetry
When I tried to create a virtual environment with Python, it didn't work
Build a local development environment with WSL + Docker Desktop for Windows + docker-lambda + Python
Prepare a development environment that is portable and easy to duplicate without polluting the environment with Python embeddable (Windows)
Build a GVim-based Python development environment on Windows 10 (3) GVim8.0 & Python3.6
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Build a python virtual environment with virtualenv and virtualenvwrapper
Build a python environment for each directory with pyenv-virtualenv
Create a python development environment with vagrant + ansible + fabric
Build a GVim-based Python development environment on Windows 10 (1) Installation
How to build a Django (python) environment on docker
I want to easily build a model-based development environment
Build a Python development environment on Mac OS X
[Go + Gin] I tried to build a Docker environment
Build a python virtual environment with virtualenv and virtualenvwrapper
I tried to automatically generate a password with Python3
Build a Python development environment using pyenv on MacOS
Build a development environment with Poetry Django Docker Pycharm
How to build a Python environment on amazon linux 2
Set up a Python development environment with Sublime Text 2
I tried to build an environment with WSL + Ubuntu + VS Code in a Windows environment
Script to easily create a client device environment for AWS IoT (Python v2 version)
I tried to build an environment for machine learning with Python (Mac OS X)
Build python3 environment with ubuntu 16.04
Build python environment with direnv
Build a Django development environment with Docker! (Docker-compose / Django / postgreSQL / nginx)
Set up a Python development environment with Visual Studio Code
How to build a new python virtual environment on Ubuntu
[Memo] Build a development environment for Django + Nuxt.js with Docker
Build a Go development environment with VS Code's Remote Containers
Build a Python development environment in Eclipse (add HTML editor)
[Ipdb] Web development beginners tried to summarize debugging with Python
Build a GVim-based Python development environment on Windows 10 (2) Basic settings
Build a comfortable development environment with VSCode x Remote Development x Pipenv
Build a Python environment and transfer data to the server
Get a clean Python development environment with pyenv + pipx + Poetry
Create a simple Python development environment with VSCode & Docker Desktop
Build a python environment with pyenv (OS X El Capitan 10.11.3)
How to get into the python development environment with Vagrant