×

Using AWS CloudFormation Macros is also Plain and Simple

Recently I wrote a blog post on creating a custom resource for AWS CloudFormation to generate a random string. With the launch of Macro support, we can even do more. I build a similar function: a random string generator. Using Macros, the function will generate a new string every time you execute a CloudFormation deployment. Btw, the Macro support is at the moment of publishing just GA for a few hours. Read more...

The effect of YAML Function shorthand on your CloudFormation ChangeSet evaluation

Consider converting CloudFormation sources from JSON to YAML? When using cfn-flip or cfnflip.com, your functions are most likely converted to the shorthand notation. This blog post is there to warn you about something I encountered today. After converting JSON to YAML with shorthand, the Change Set evaluation told me that some resources will be replaced! Of course this is not what I wanted, and even not what I would have expected! Read more...

Building CloudFormation Custom Resources is Plain and Simple

I discovered most blog posts and documentation about Custom Resources for CloudFormation, are very complicated. It’s perfect for experienced users, but it’s pretty hard to use it for the first time. This blog post is really easy to use as your first CloudFormation Custom Resource project, and generally a good fit for most use cases. Spoiler: the whole Custom Resource Stack is a single file. It doesn’t have to be packaged and uploaded to S3, and it’s deployed using a single command. Read more...

Command Line Apps in Python

Introduction Python is a great language for automation. Ansible, SaltStack and Fabric are Python based. Most DevOps tools provide an SDK for Python. Cloud providers like AWS, Google Cloud Platform (GCP) and Azure provide an SDK for Python. The Python standard library provides capabilities that support automation. Python is a good alternative to bash. Python scripts can be tested and reused. Python scripts that are available as a Command Line Interface (CLI) application enable DevOps. Read more...

How to obtain the IP Addresses of a Network Load Balancer in CloudFormation

In order for the network load balancer to execute a Health Check, you need to create a security group using the IP addresses of the load balancer. Unfortunately, you cannot obtain the ip addresses of the load balancers in CloudFormation. This forces you to grant access to the entire VPC CIDR or the relevant subnet CIDRs in which the load balancer is deployed.

With this custom CloudFormation Provider you can obtain the actual private ip addresses of the load balancers, allowing you to create a security group to explicitly grant access to a specific load balancer.

Read more...

Functional Programming in Scala

Introduction In the previous article about Functional Programming in Python, I explained that Functional programming (FP) is a paradigm where a program is composed of functions. Solving problems in a functional way results in simple but powerful processing pipelines. Create pipelines using Functional Data Structures (FDS), Higher Order Functions (HoF) and functions. Pipelines are a chain of functions that always return a value. This time we’ll look how to create processing pipelines using Scala, a Functional/Object Oriented programming language created by Martin Odersky at EPFL, a world leading university in Lausanne, Switzerland. Read more...

Functional Programming in Python

Introduction Functional programming (FP) is a paradigm in where a program is composed of functions. A function is a building block that encapsulates a computation. A function applied with a value, always returns the same computed value. FP avoids mutating state. FP allows developers to create powerful processing pipelines. Most programming languages have support for functional programming, including Python. Lets take a look how FP in Python works. Functions and Python Python uses the lambda keyword to define a function. Read more...

A custom provider for EFS Provisioned Throughput

On July the 12th, 2018, Amazon announced the availability of Provisioned throughput for EFS volumes. This is a very valuable feature for anybody using EFS. Unfortunately, it can only be enabled through the Console or the API. Although the Console is nice for playing around, it is not suitable for engineering solutions on AWS. With this custom provider you can specify provisioned throughput for EFS in CloudFormation, 4 days after the release!

On August the 8th, we discovered that the properties ThroughputMode and ProvisionedThroughputInMibs can now be set in AWS::EFS::FileSystem, making this provider obsolete!

Read more...

AWS Cloudformation Validation in CI/CD Pipelines

Providing autonomy to DevOps teams, faster feedback loops, and ensuring compliant use of the Cloud. More and more organizations transform to a DevOps organization. This involves giving DevOps teams the responsibility for their cloud infrastructure. I’ll describe how to give DevOps teams the freedom to write their own infrastructure code with Cloudformation, and validate their source code against policies we have set. Read about how to force the use of tags, use a white list or black list for service types, and check the templates for prohibited property values. Read more...

How we created a serverless version of cfn-flip

The original version of cfn-flip is a command line tool that converts CloudFormation templates from JSON to YAML and vice versa. This tool has existed for some time and does the job magnificently. Most people find YAML more readable. I belong to the minority that finds JSON easier to read.

Read more...
Page 1 of 3 Next Page