Automate infrastructure provisioning with AWS CloudFormation and Buddy

Automate infrastructure provisioning with AWS CloudFormation and Buddy

AWS CloudFormation allows developers to manage infrastructure resources in Amazon Cloud Services across all regions and accounts with a single text file. The new CloudFormation action in Buddy lets you easily deploy, update and remove CF stacks. For example, you can create a pipeline that will perform the following for every pull request:

  1. Provision infrastructure in your AWS account with a CF template file
  2. Deploy your application to the server
  3. Start the application
  4. Run integration tests
  5. Clean up the CF stack once everything is over

Image loading...Pipeline example

Configuring AWS CloudFormation

The action can be found in the AWS section of Buddy's action roster:

Image loading...AWS actions

If you haven't used Amazon actions before, you will be asked for access and secret keys to your AWS account. Make sure the IAM user who is adding the integration is allowed to access the resources that you want to provision with CloudFormation.

Image loading...Adding an AWS integration

With the integration added, you can now configure the action details. The most important are:

  • stack name
  • method to run (create / update / deploy / delete)
  • path to the template file (must be uploaded to the repository)

Image loading...CloudFormation confirguration

Once you select the template and proceed, a new view will appear. There you can modify the AWS CLI commands generated by the previous step, add new ones, and fill in any other missing parameters.

Image loading...Default run commands

From now on, Buddy will automatically provision your AWS infrastructure for integration tests on every pipeline execution. Of course, this is just an example - it is you who decide how and where to use it.

Coming up

In the nearest future we are going to add dedicated integrations for Ansible and Terraform. Stay tuned for more info!

Jarek Dylewski

Jarek Dylewski

Customer Support

A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.

Jun 6th 2019
Share