Automating AWS CloudFormation Stack create/update using Bitbucket Pipeline.

  1. It contains 3 steps. First one is to deploy to DEV environment automatically, second one is to TEST environment using manual tigger and third one is to PROD environment using manual tigger.
  2. You can add the above to bitbucket pipeline and configure it to execute on release branch automatically or manually.
  3. First parameter file is read into environment variable [export PARAMETERS=$(cat ./parameters_dev.json)] to set STACK_PARAMETERS variable which supports only JSON String type.
  4. AWS access key and secret key values are populated from bitbucket repository variable.
  5. WAIT: ‘true’ set to wait until AWS resources defined in CloudFormation are successfully created/updated.
  6. If you include resources in CloudFormation that can affect permissions in your AWS account, right values for CAPABILITIES needs to be set.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nanthan Rasiah

Nanthan Rasiah

AWS APN Ambassador | Solutions Architect | AWS Certified Pro | GCP Certified Pro | Azure Certified Expert | AWS Certified Security & Machine Learning Specialty