http://docs.aws.amazon.com/ja_jp/elasticbeanstalk/latest/dg/create-deploy-python-flask.html I will work along with
[AWS] Flask application deployment preparation for building Python environment with eb is over
In short, it is OK if you can use the following 4
Deploy using Homebrew on Mac
command
brew install awsebcli
Verification
eb --version
result
EB CLI 3.7 (Python 2.7.1)
variable
VIRTUAL_ENV_NAME='eb-test-Flask'
command
VIRTUAL_ENV_NAME='eb-test-Flask'
PJ_DIR_NAME='eb-flask'
cd ~/${VIRTUAL_ENV_NAME}/${PJ_DIR_NAME}
pwd
result
/Users/****/eb-test-Flask/eb-flask
command
eb init -p python2.7 flask-tutorial
result
You have not yet set up your credentials or your credentials are incorrect
You must provide your credentials.
(aws-access-id): *****************← Enter credentials
(aws-secret-key): ****************← Enter credentials
Application flask-tutorial has been created.
You can check it on the console (you can probably go to Oregon by tracing this procedure as it is)
command
eb init
result
Do you want to set up SSH for your instances?
(y/n): y
Type a keypair name.
(Default is aws-eb): eb-test-yuki
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/****/****/eb-test-hoge.
Your public key has been saved in /Users/****/****/eb-test-hoge.pub.
The key fingerprint is:
The key's randomart image is:
WARNING: Uploaded SSH public key for "eb-test-hoge" into EC2 for region us-west-2.
command
eb create
result
Enter Environment Name
(default is flask-tutorial-dev): flask-env
Enter DNS CNAME prefix
(default is flask-env):
This will run the process, so wait for a while
command
eb open
Even after typing this command, it will take some time before you can actually see the site.
When you connect to the site using the URL, you should have the same environment as you did at hand.
command
eb terminate flask-env
Recommended Posts