Proceed with next steps only if there are actual stack updates

Can we implement a way to restrict next steps from executing if in current step there are No Updates in AWS stack? If there are updates, then let is function normally by calling next steps, but if there is no change in stack due to deployment, then I would like to prevent next steps from executing.

Please can someone advise on this?

Hi @pratik.surani, thanks for reaching out.

To determine if a CloudFormation template will result in any changes you’ll have to do some custom scripting.

The create-change-set command ( can be used in a Run an AWS CLI Script step to create a CloudFormation change set.

The describe-change-set command ( can then be used to find out if there are in fact any changes that need to be applied.

The output of the describe-change-set command can then be used to set a variable ( which is then used as part of a run condition ( to determine if subsequent steps should be processed.

If there are changes to be applied, you can use the Apply an AWS CloudFormation Change Set step to apply the changes and continue on with any other deployment steps.

Matt C