In our last post we have seen how to use EB CLI for managing elastic beanstalk through command line. But, you can also manage elastic beanstalk using traditional AWS CLI. In this post you will find AWS CLI cheat sheet for the same.
If you are new to Elastic Beanstalk, it’s recommended that you go through this free AWS Elastic Beanstalk crash course.
Below are the major commands used frequently while managing the elastic beanstalk environment.
To check the availability of a CNAME
aws elasticbeanstalk check-dns-availability --cname-prefix my-cname
To create a new application
aws elasticbeanstalk create-application --application-name CldVdsApp --description "my application"
aws elasticbeanstalk compose-environments --application-name media-library --group-name dev --version-labels front-v1 worker-v1
To create a new environment for an application
The following command creates a new environment for version “v1” of a java application named “CldVdsApp”:
aws elasticbeanstalk create-environment --application-name CldVdsApp --environment-name my-env --cname-prefix CldVdsApp --version-label v1 --solution-stack-name "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8"
To specify a JSON file to define environment configuration options
The following create-environment command specifies that a JSON file with the name myoptions.jsonshould be used to override values obtained from the solution stack or the configuration template:
aws elasticbeanstalk create-environment --environment-name sample-env --application-name CldVdsApp --option-settings file://myoptions.json
To create a storage location
The following command creates a storage location in Amazon S3:
aws elasticbeanstalk create-storage-location
To abort a deployment
aws elasticbeanstalk abort-environment-update --environment-name my-env
To delete an application
The following command deletes an application named CldVdsApp:
aws elasticbeanstalk delete-application --application-name CldVdsApp
You can refer the complete set of AWS CLI for elastic beanstalk on this link.
Note:- All the above commands are taken from different AWS CLI reference guides and put in one place over here. Please run the commands after due diligence as we won’t be responsible for any mistakes in executing the commands and it’s consequences. If you have any concern or query feel free to contact us or comment below.