Configuring Application Architecture

There are three category of services provided by AWS to assist with implementing elasticity, deployment, and configuration management of applications. Generally, the more convenience you ask for, the less control you will get. You need to decide which service best suits your needs and matches your skill set:

  1. AWS Elastic Beanstalk: Most convenient, least control
  2. AWS OpsWorks: Mid level convenience and control
  3. AWS CloudFormation: Least convenient but you have the most control

Elastic Beanstalk

Elastic Beanstalk offers easy-to-use pre-packaged services for scaling and deploying web applications and services using Java, .NET, PHP, Python, Ruby, Docker, Node.js on Apache, Nginx, and IIS. You upload your code, and Beanstalk takes care of the rest; deployment, provisioning, load balancing, auto-scaling, monitoring and other elastic issues.

A common workflow for using beanstalk is the following:

  1. Write code, save name, and version. Then upload to S3. You can import your code from GIT, AWS management console, or use AWS toolkits for Visual Studio or Eclipse.
  2. When code is in S3, beanstalk can deploy it. It handles all everything else.

Beanstalk is not a blackbox. You can see what it is doing and you can reconfigure it. For example, you can change EC2 instance types, database services, switch to https, adjust auto-scaling settings, etc. To change settings, update the .config files inside the .ebextensions folder. .config files are in JSON or YAML format.


OpsWorks offers a good balance between convenience and control. You should consider using it if your application is more complex than what can be supported by Beanstalk. Basically, if you need more granular control of your application setup and deployment, then you need OpsWorks.

Infrastructure is conceptually divided into stacks and layers. A stack is a group of servers that server a purpose together. For example, you application needs an application server, database server, and a caching server. Together, these servers constitute a stack. Applications often have development stacks, staging stacks, and production stacks. Layers conceptually describes the servers by their function. For example, there is a database layer, application layer, etc. In OpsWorks Stacks, all servers can be configured using Chef recipes. Following is an example workflow or OpsWorks usage:

  1. create stack
  2. create layer
  3. define applications
  4. write chef recipes
  5. launch instance
  6. deploy application

OpsWorks will help you with architecture complexities such as configuration management, deployment management, and other elastic issues.


CloudFormation provides easy way to create and manage a collection of AWS resources. It allows you to define and entire application stack. You do this by writing descriptive text files in JSON format. These files can then be used to rebuild identical stacks. Needless to say, CloudFormation is very powerful but you need the technical skills to take full advantage of it and continue maintaining and upgrading it. If you decide to go this route, I would highly recommend that you study CloudFormer first. It will save you a lot of time and effort.