Faster deployments with CloudFormation express mode

Takomo 11.1.0 adds support for the new CloudFormation express mode, as well as disabling stack rollback, through a new deploymentConfig stack property.

What is express mode?

In the standard deployment mode, CloudFormation waits until every resource is ready to serve traffic before it completes a stack operation. In express mode, CloudFormation completes the operation as soon as the resource configuration has been applied, and the resources continue becoming ready in the background. According to AWS, this can make deployments up to four times faster.

Express mode works well in development and test environments, and for stacks whose dependents don't need the resources to be fully ready right away.

Enabling express mode

Set the deployment mode in a stack group configuration file to deploy every stack under the group in express mode:

stacks/dev/config.yml
1deploymentConfig:
2  mode: EXPRESS

Like other stack properties, deploymentConfig can also be defined in blueprint and stack configuration files. For example, you can deploy most stacks in express mode but keep one stack in the standard mode:

stacks/dev/database.yml
1deploymentConfig:
2  mode: STANDARD

Disabling rollback

The deploymentConfig property also lets you disable stack rollback. When rollback is disabled and a stack operation fails, CloudFormation leaves the resources in their failed state, so you can find out what went wrong instead of waiting for a rollback to finish first.

1deploymentConfig:
2  mode: EXPRESS
3  disableRollback: true

Takomo handles stacks left in a failed state:

  • A stack whose creation failed (CREATE_FAILED) is deleted and created again on the next deployment.
  • A stack whose update failed (UPDATE_FAILED) is updated on the next deployment, and it can also be undeployed.

Overriding only what you need

The mode and disableRollback properties are inherited separately. A stack can override one of them and still inherit the other from its blueprint or stack group:

stacks/config.yml
1deploymentConfig:
2  mode: EXPRESS
stacks/my-stack.yml
1deploymentConfig:
2  disableRollback: true

Here my-stack is deployed in express mode with rollback disabled.

Learn more

See the deploymentConfig documentation for all the details.