AWS Infrastructure as Code: Development Advantages Brought to Your Infrastructure

AWS was the first to bring Infrastructure as Code to us in 2011 with its CloudFormation service.  Since then, infrastructure as code, through AWS CloudFormation and AWS OpsWorks, has been bringing many of the advantages of the development lifecycle to the infrastructure lifecycle.  These devops advantages have made working with your infrastructure much more controllable, reproducible, flexible, and efficient.

Version Control

Version Control is defined as “the management of changes to documents, computer programs, large web sites, and other collections of information.”  This quick and effective way of tracking changes to your code has been utilized for decades but with infrastructure is only relatively new.  Before AWS Infrastructure as Code with CloudFormation, one would have to manually track all changes across their infrastructure.  This becomes complex with a large number of servers running different applications and needing different dependencies.  In this environment, configuration management is complex and time consuming.  Administrators need to have detailed logs to keep track of which versions of applications, libraries, and updates are installed on which servers. 

AWS CloudFormation allows you to define your entire infrastructure through text file configurations.  These configuration files can be written in JSON or YAML.  By having your infrastructure coded out in these configuration files, it allows your infrastructure to be tracked via version control systems such as git via AWS CodeCommit.  Having a central location defining your entire infrastructure, administrators and developers have an easy single location to keep track of their systems configuration thus making configuration management easier.  The version control aspects also allow changes to be tracked automatically over time and for your infrastructure to be controlled via a release schedule similar to your applications.  By tracking all of these changes and the release schedules, you are able to easily rollback in the event a release doesn’t go as planned.  These are some of the advantages that version control now brings to your infrastructure.

Reproducibility

The complexities discussed under version control can also cause issues with reproducibility when trying to replicate issues found in production environments when human errors have caused environments to be different.  With infrastructure as code through AWS CloudFormation, the build out and updates to your servers become tracked and reproducible.  Running the same configuration multiple times will produce the same output.  Manually missed steps due to human errors will no longer cause environment discrepancies.  AWS CloudFormation allows you to ensure all infrastructure updates are consistent and reproducible across all of your environments.  CloudFormation also allows your infrastructure updates to be testable too as deployments are now automated and no longer manually done.

Flexibility

Another advantage of using Infrastructure as Code with AWS is the flexibility that the combination gives you.  Now updating your infrastructure to new server sizes or changing an availability zone for a server is as easy as changing a variable in a line of Java code.  Your infrastructure now becomes as easy to interact with and alter as it is to develop an application.  AWS CloudFormation configuration files and AWS OpsWorks Puppet or Chef scripts provide you the flexibility to change your infrastructure quickly and easily.  In the old world before the cloud, one would need to physically purchase new hardware, physically rack it, manually install it, and manually configure it to make a change to your infrastructure.  When the cloud came, it made it easier to provision server resources instantly but you still had to manually install and configure your applications.  Infrastructure as Code with both AWS CloudFormation and AWS OpsWorks provides another level of flexibility on top of that since you are able to make updates quickly and automatically.  With your infrastructure coded, changing 100 servers from being t2.micro servers to being a t2.medium servers can be done with the change of a configuration file instead of having to manually switch over all of those servers.

Efficiency

Lastly, AWS CloudFormation and Infrastructure as Code makes administrators and developers more efficient.  Efficiency gains from building our infrastructure through code come from the automation that is capable via AWS CloudFormation and OpsWorks.  Examples of these efficiency gains can be seen when building infrastructure in one AWS region and then realizing you need to produce the same infrastructure in another region for backup purposes.  With CloudFormation and OpsWorks, you can quickly update the configurations for the new region and deploy it out automatically.  Another example of efficiency gains is when similar infrastructures are needed to support different development projects.  Devops administrators and developers can quickly build out environments automatically be reusing CloudFormation configurations to produce similar environments.

Finally, these are just some of the many advantages that are gained from utilizing the AWS Devops practice of Infrastructure as Code.  Version control, reproducibility, flexibility, and efficiency help you deliver your solutions to your customers faster which is extremely important in today’s evolving world where technological advances seem to be growing at an exponential rate.