Blog category: CloudFormation

Creating Elasticsearch Domain did not stabilize - can't create AWS Elasticsearch 5.1 with CloudFormation

February 17, 2017 by Paulina Budzoń

Recently AWS announced support for Elasticsearch 5.1 in their Elasticsearch Service. Today, I tried to upgrade an existing CloudFormation stack, previously using Elasticsearch 2.3, to the new version and, after a very long wait, CloudFormation rolled back the stack with the following error: “Creating Elasticsearch Domain did not stabilize”. Here’s what I did to solve it.

Continue reading

Deploying API Gateway and Lambda with CloudFormation

November 21, 2016 by Paulina Budzoń

Combination of AWS API Gateway and Lambda functions is a flag example of every “serverless infrastructure”. When deploying API Gateway with CloudFormation there are two different ways you can define your API: via Swagger template or by directly defining your methods in CloudFormation template.

Continue reading

What's broken when deploying Lambda and API Gateway via CloudFormation

November 14, 2016 by Paulina Budzoń

AWS Lambda and API Gateway are becoming synonymous with “serverless infrastructure” and getting more and more popular. To deploy them in repeatable way, one of the tools I recommend is CloudFormation. There are many ways you can define your API and your Lambda, but when connecting the two with CloudFormation there’s usually something that many people miss, and only notice when {"message": "Internal server error"} is thrown from their API Gateway endpoint.

Continue reading

How to validate CloudFormation template with AWS CLI

September 16, 2016 by Paulina Budzoń

Validating your template before uploading it to CloudFormation to create resources is probably the best thing you can do to avoid the dreaded UPDATE_ROLLBACK_IN_PROGRESS status.

This can easily be done without creating the stack, by using the validate-template AWS CLI command.

Continue reading

Using Troposphere to create CloudFormation stack template

September 9, 2016 by Paulina Budzoń

If you’ve ever wrote AWS CloudFormation template, you probably know that it can be a daunting task. Luckily, it can be much easier, if you use Python’s library “Troposphere”.

Troposphere lets you create Python objects in place of CloudFormation elements, does some basic validation of your input and generates the JSON template for CloudFormation for you. It is much easier and cleaner to use that writing JSON templates manually.

Continue reading