Amazon AWS Elastic Beanstalk Command Line Interface
To install Amazon AWS Elastic Beanstalk Command Line Interface (EB CLI), run
1 |
pip install awsebcli |
To create a project.
1 2 3 4 |
mkdir serverok cd serverok git init eb init |
To create servers in AWS, run
1 |
eb create |
It ask some question, once you done, it shows URL like following
In this cause, the URL http://serverok-dev.us-west-2.elasticbeanstalk.com/ can be used to access my application.
To deploy an application, create a file, commit to git.
In few minutes, you will be able to see the file on your Elastic Beanstalk application url
http://serverok-dev.us-west-2.elasticbeanstalk.com/test.php
When you are done with it, you can terminate the environment with command
1 |
eb terminate |
It will show in AWS Console > Elastic Beanstalk with info “Waiting for EC2 instances to terminate.”