First impressions using Aws CDK With Golang

AWS recently announced Go Support for the AWS Cloud Development Kit. We’ve been looking forward to this, primarily as GoLang is the preferred language of our application teams, and thus using the same language for the Service and the Infrastructure As Code (IAC) would be very useful. I’ve previously experimented with AWS’s CDK with TrueScript for some support services. In terms of an IAC toolkit, it worked well. It was nice to use a programming language, rather than template file to define the infrastructure required.

Using a parameter to override a Mapping in Cloudformation

A discussion arose on InfraCoders Slack recently, about whether to use Mapping or Parameters in CloudFormation. I chimed in, and mentioned a pattern that we’re using to leverage Mappings to provide defaults, but still utilise the flexibility of a parameter to override when needed; so I’m sharing the pattern that I mentioned. Mapping is a useful capability in AWS’s CloudFormation to provide a lookup mechanism for resource parameters. This is particularly useful for parameters such as Instance Types, where you may want to use different sizes or types between environments.