Multi-Region Application Architecture

This guidance deploys a reference architecture that models a serverless active/passive workload with asynchronous replication of application data and failover from a primary to a secondary AWS Region. To verify that regional failover is working, a sample photo-sharing web application can also be deployed, serving as a visual demonstration for the backend layers. This guidance allows for a 15-minute Recovery Point Objective (RPO) and a Recovery Time Objective (RTO) of a few seconds.

Overview

The diagram below presents the architecture you can build using the example code on GitHub.

Multi-Region Application Architecture guidance architecture

The AWS CloudFormation template uses AWS CloudFormation StackSets to deploy the routing layer and back-end infrastructure in both the primary and secondary (failover) AWS Regions. An optional second AWS CloudFormation template can be deployed after the solution’s main template has completed deployment. This second template deploys an AWS Amplify sample web application hosted in an Amazon S3 bucket, an Amazon CloudFront distribution to deliver the web application to users, and an Amazon Cognito user pool and identity pool to enable users to access the web application, the routing layer, and the back-end infrastructure resources.  

After the web application loads, it queries the guidance's routing layer for the current state of the application (active, fenced, failover), and configures AWS Amplify to target the guidance’s resources in the correct Region. The state of the application is also retrieved when the user uploads a new photo or adds a comment. Depending on the state of the application, a message may be displayed to indicate whether or not certain actions are available, or if the application must be refreshed.

Multi-Region Application Architecture

Version 1.1.0
Last updated: 01/2021
Author: AWS

Additional resources

Did this Guidance help you?
Provide feedback 

Features

Web Application

Use the sample photo-sharing web application as a visual demonstration of the guidance’s back-end layers and to verify that regional failover is working.

Origin Failover

Manually configure Origin Failover on the solution’s CloudFront to serve the application from the secondary Region.
Video
Solving with AWS Solutions: Multi-Region Application Architecture
Build icon
Deploy an AWS Solution yourself

Browse our library of AWS Solutions to get answers to common architectural problems.

Learn more 
Find an APN partner
Find an AWS Partner Solution

Find AWS Partners to help you get started.

Explore icon
Explore Guidance

Find prescriptive architectural diagrams, sample code, and technical content for common use cases.

Learn more