May 5, 2016

Automated Blue/Green deployment using Lambda and CloudFormation

Blue/Green deployment is a well-known method to deploy an application without any downtime. Performing DNS switch is one of the very common techniques to achieve this. Using DNS switch has a minor issue with DNS caching which might take some time for DNS change to be propagated. Apart from DNS switch, AWS gives us two different options to switch the stacks. One is to have single ELB and swap it across auto-scaling group and another is switching the launch configuration of the auto-scaling group. Read more

December 6, 2015

CloudFormation parameters grouping and labelling

Last week AWS enhanced CloudFormation by adding new services like AWS CodePipeline, AWS Config, AWS KMS and few more; default stack limit also has been increased from 20 to 200. Among other new features they also have introduced this small but useful parameters grouping and labelling feature. Earlier all the parameters in a CFN template get listed in alphabetical order based on the logical name of the parameter. Also the parameters logical name is restricted to alphanumeric characters hence it causes some restrictions. Read more

November 27, 2015

Automated cross account DNS management through CFN and API access through API gateway

It’s a general best practice to manage all DNS entries in Route53 in a centralized AWS account. In that case it is difficult to automate the DNS record creation/deletion based on resources created in another AWS account using CloudFormation. CloudFormation doesn’t yet have the capability to create resources in a different AWS account. Combining IAM role delegation, AWS Lambda & CFN Custom resources provides us a solution. I have extended the same solution by exposing the Lambda function through API gateway which provides a powerful mechanism. Read more

November 22, 2015

Obtain AMI Id from name to be used in CFN

In most cases we create custom AMI’s for various reasons like OS hardening, installing and configuring additional software, etc. If you use single AWS account to create the AMI’s and share it with other AWS accounts and use that as part of CloudFormation template, it is required to pass the new AMI Id every time. AWS Lambda comes handy for easy and elegant solution to get the latest AMI Id based on the AMI name and owner. Read more

November 6, 2015

Best editor for AWS CloudFormation template (JSON)

AWS CloudFormation template is a way to describe the AWS resources that can be created/updated/deleted and it’s in JSON format. Like many other programming languages most of the editors/IDE don’t have proper syntax highlighting for JSON. For a long time I was using notepad++ and the built-in Javascript syntax highlighting which doesn’t provide much granular highlighting. I was looking for a much better editor and finally found Atom, the most powerful editor by GitHub. Read more

© Prakash P 2015 - 2019

Powered by Hugo & Kiss.