Automated deployment - Disaster Recovery for AWS IoT

Automated deployment

Before you launch the solution, review the architecture, solution components, security, and design considerations discussed in this guide. Follow the step-by-step instructions in this section to configure and deploy the solution into your account.

Time to deploy: Approximately 20 minutes

Step 1. Launch the stack

This automated AWS CloudFormation template deploys Disaster Recovery for AWS IoT in the AWS Cloud.


You are responsible for the cost of the AWS services used while running this solution. For more details, visit to the Cost section in this guide, and refer to the pricing webpage for each AWS service used in this solution.

The main template launches in the US East (N. Virginia) Region by default. Do not change this Region. The other templates will be launched in the primary and secondary Regions independently of the Region of the main stack.

  1. Sign in to the AWS Management Console and select the button to launch the disaster-recovery-for-aws-iot AWS CloudFormation template.

                aws-sharr-deploy.template launch button

    You can also download the template as a starting point for your own implementation.

By default, the stack name is IoTDRSolution. Consider using a more meaningful name, such as IoTDRSolution-primary-region-secondary-region. This helps to distinguish disaster recovery setups if you launch multiple stacks.

  1. The template launches in the US East (N. Virginia) Region by default. To launch the solution in a different AWS Region, use the Region selector in the console navigation bar.

  2. Choose PrimaryRegion and SecondaryRegion.

  3. On the Review page, review and confirm the settings. Check the box acknowledging that template will create AWS Identity and Access Management (IAM) resources.

  4. Choose Create stack to deploy the stack.

You can view the status of the stack in the AWS CloudFormation Console in the Status column. You should receive a CREATE_COMPLETE status in approximately 2 minutes.

After the main stack has been created, you can watch the progress of creating the other stacks at the logs of your CodeBuild project:

  1. In the Outputs section of your main stack, select the link next to CodeBuildLaunchSolutionProject.

  2. Under Build history > Build run, select the link with a name similar to CodeBuildLaunchSolution-[A_UNIQUE_STRING]

  3. Select Tail logs. A window is opened where you can see the progress of the IoT DR solution setup. Several CloudFormation stacks are launched.

Every stack is postfixed with a timestamp in this format: %Y%m%d%H%M%S

  • Stacks in primary Region:

    • IoTDRPrimaryPOSTFIX

    • R53HealthCheckerPOSTFIX

  • Stacks in secondary Region:

    • IoTDRSecondaryPOSTFIX

    • R53HealthCheckerPOSTFIX

AWS CodeBuild should take approximately 10 minutes to finish. In the Outputs section of your main stack, you can find links to the CloudFormation stacks in the primary and secondary Regions.


This solution includes helper Lambda functions, which only run during initial configuration or when resources are updated or deleted.

When you run this solution, helper Lambda functions appear in the AWS console. Helper Lambda functions use tags, such as CloudFormation:CustomResource and Solution:IoTDR. You can find these functions in the AWS Lambda console by applying these tags as filters.