CloudFormation Not to bad after all

    In the realm of AWS there are many cool ways to automate your code an the underlying infrastructure that will run said code. As someone who has used various techniques ranging from writing your own bash scripts to TerraForm I thought I would take a few minutes to focus on using CloudFormation.

    For those new to the AWS scene CloudFormation is the service provided by AWS to automate deployment of the services and configurations of your infrastructure in the cloud. When I first was introduced to the product I found many problems and limitations with it. That being said it has been a few years and with any technology a few years yields leaps and bounds in improvements in the service and technology.

    One of the first things that was a big problem when I first visited the service was the ability to be able to pull some pieces of information together that would make having to gather input and introducing human error into the process. They have since added the capability to use custom lambda functions which greatly reduces this problem. Utilizing a custom lambda you can do something such as gather information about your subnets and make sure that these are then used to setup parts of your template. As an example you might have a subnet specifically for your RDS instances. If you name the resources appropriately in your templates you can then use a lambda to find these subnets and update the configurations of reliant resources dynamically instead of relying on humans to perform this.

    Another nice feature they have added as well is the ability to deploy the templates across multiple regions and accounts. This is important after all because we want to plan for the if not the when mentality. AWS does a good job of letting you know that they are not perfect. They put many different protections in place but as with all technology they know that there will be problems that are not planned. With this in mind having multiple regions is just part of this mindset. In the past you had to create complex sets of templates that were geared towards the different regions. Often these templates would be similar in content except for the few items needs for that region. This is where I would use something like terraform in the past but with this recent addition I have stepped back into the CloudFormation realm.

    Saving the best for last I would say is the new drift detection. Many people had problems with understanding exactly what the template was going to do when they updated a part of the template. It often resulted in the infamous "I shot myself in the foot" syndrome. Now with drift detection you can tell what parts of your stack are going to be impacted and if it's not what you expect prevent this. It was one of the many features I loved with Terraform and the plan command. It helps you to understand that particular parts of the AWS infrastructure may not be updated as you thought. This in my mind should have been introduced a long time ago for the system to be usable for companies but better late than never.

    So overall I would say if you haven't looked at the CloudFormation tool lately it's worth it. It has lots of new capabilities that further enhance your capabilities with the AWS services. Of course there are also reasons like not tying yourself to one cloud provider and such that may still make other options better for you. As with all it solutions looking at what you are trying to accomplish and how the systems can answer this should always be part of your thoughts. That's it for this article until next time Fair winds and following seas.

    

Comments

Popular posts from this blog

Reasons to Build Systems in the Cloud

The cloud only as cool as you make it