AWS News Blog

AWS Elastic Beanstalk APIs and Command Line Tools

Just like every other part of AWS, Elastic Beanstalk is programmable. A complete set of Elastic Beanstalk command line tools is available. You can use the Elastic Beanstalk APIs or the command line tools to integrate Elastic Beanstalk into your existing development process in new and interesting ways.

For example, Makefiles (and other build tools such as Ant) generally include build targets for test and deploy. It would be easy to modify the actions associated with these targets to create Elastic Beanstalk Applications or Environments as needed. The actions could also use the RDS command line tools to create or clone Amazon RDS DB Instances, use them for testing, and then destroy them afterward. This dynamic use of hardware and system resources will be cost-effective and a good illustration of the power and value of cloud computing.

You could also implement powerful regression testing tools, iterating through an application’s versions or configurations in order to figure out exactly when a particular bug appeared or disappeared or when performance or responsiveness unexpectedly took a turn for the worse. In a somewhat related vein, you could combine this with my first suggestion and take up the practice of continuous integration, putting the entire system together and testing it out after every change is committed.

If you have built a Software as a Service (SaaS) application using Elastic Beanstalk and need to deploy a new instance for each customer, you can automate the entire on-boarding process. You can dynamically instantiate and configure the entire application, effectively building a production line which spits out customized application deployments. The deployment can include Elastic Beanstalk applications, RDS DB instances (sized and tuned for each customer), and even domain names courtesy of our new Route 53 service.

Here are some of the fundamental Elastic Beanstalk API calls and their command-line equivalents:

  • The CheckDNSAvailabilityFunction function (elastic-beanstalk-check-dns-availability from the command line) verifies that a desired DNS name (CNAME) is available for you to use for an environment.
  • The CreateApplication function (elastic-beanstalk-create-application from the command line) creates an empty application no versions and a default configuration template, using a name and a description that you provide.
  • The CreateApplicationVersion function (elastic-beanstalk-create-application-version from the command line) creates a new version of an application. You must supply a description and a label for the version, and you can also provide a pointer to an Amazon S3 bucket that contains the source bundle for the application. If you don’t supply this information a sample application version will be used instead.
  • The CreateEnvironment function (elastic-beanstalk-create-environment from the command line) launches an application for you using a specified configuration template and application version.
  • The CreateConfigurationTemplate function (elastic-beanstalk-create-configuration-template from the command line) creates a new configuration template within your application using the option settings and container type that you specify.

You also have access to a complete set of Describe, Delete, and Modify functions and tools.

If you use the Elastic Beanstalk APIs or the command-line tools to create a powerful and/or interesting integration or if you have an idea for one, please feel free to leave a comment.

This is the end of the Elastic Beanstalk tour. Next stop: Elastic Beanstalk detail page.

— Jeff;

Jeff Barr

Jeff Barr

Jeff Barr is Chief Evangelist for AWS. He started this blog in 2004 and has been writing posts just about non-stop ever since.