Automated deployment - Multi-Region Infrastructure Deployment

Automated deployment

Before you launch the automated deployment, please review the architecture, configuration, and other considerations discussed in this guide. Follow the step-by-step instructions in this section to configure and deploy Multi-Region Infrastrucutre Deployment into your account.

Time to deploy: Approximately five minutes

Prerequisite

This solution uses AWS Secrets Manager to securely store the GitHub credentials. Before launching this solution, create a secret and store it in AWS Secrets Manager.

  1. Sign in to the AWS Secrets Manager console.

  2. Choose Store a new secret.

  3. On the Store a new secret page, select Other type of secrets, and enter the following key and value pairs:

    Key Value Description
    github-username <Your GitHub username> The name of the GitHub user or company that owns the GitHub repository.
    github-access-token <Your GitHub access token> The GitHub authentication token that allows AWS CodePipeline to perform operations on your GitHub repository.
  4. Choose Next.

  5. In Step 2 Name and description, enter a Secret name and choose Next.

  6. In Step 3 Configure automatic rotation, choose Next.

  7. In Step 4 Review, choose Store.

After storing a new secret for this solution, proceed to Launch the stack.

Launch the Stack

Note

You are responsible for the cost of the AWS services used while running this solution. See the Cost section for more details. For full details, see the pricing webpage for each AWS service you will be using in this solution.

  1. Sign in to the AWS Management Console and click the button below to launch the multi-region-infrastructure-deployment AWS CloudFormation template.

    
                                Multi-Region Infrastructure Deployment solution launch button

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

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

  3. On the Create stack page, verify that the correct template URL shows in the Amazon S3 URL text box and choose Next.

  4. On the Specify stack details page, assign a name to your solution stack.

  5. Under Parameters, review the parameters for the template, and modify them as necessary. This solution uses the following default values.

    Parameter Default Description
    Notification Email Address <Optional input>

    Email address to receive notifications for change and drift detection.

    Solution Secret Name <Requires input>

    The name for the AWS Secrets Manager secret.

    GitHub Repo <Requires input>

    The name of the repository where source changes are detected.

    GitHub Branch <Requires input>

    The name of the branch where source changes are detected.

    Secondary Region <Requires input>

    The secondary AWS Region that this solution deploys AWS CloudFormation stacks to.

    Template Path <Requires input>

    The root GitHub repo path to the CloudFormation template that this solution deploys.

    CloudFormation Execution Policy <Requires input>

    The IAM policy that has the necessary permissions to manage the AWS CloudFormation template specified in the TemplatePath parameter.

    Stage Parameters <Optional input>

    AWS CloudFormation template parameters passed to the stage stack.

    Note

    Enter the parameters as a JSON Object with a key for each parameter in the stage stack and the appropriate value. Leave this parameter blank if the template in GitHub doesn’t accept parameters.

    Secondary Parameters <Optional input>

    AWS CloudFormation template parameters passed to the secondary stack.

    Note

    Enter the parameters as a JSON Object with a key for each parameter in the secondary stack and the appropriate value. Leave this blank if the template in GitHub doesn’t accept parameters.

    Primary Parameters <Optional input>

    AWS CloudFormation template parameters passed to the primary stack.

    Note

    Enter the parameters as a JSON Object with a key for each parameter in the primary stack and the appropriate value. Leave this blank if the template in GitHub doesn’t accept parameters.

    Delete Stage Stack Yes

    Specifies whether or not to terminate the stage environment. If set to Yes, the stage environment terminates after manual approval to deploy the infrastructure changes to the primary and the secondary environments. If set to No, then this solution will keep the stage environment after the manual approval.

  6. Choose Next.

  7. On the Configure stack options page, choose Next.

  8. On the Review page, review and confirm the settings. Be sure to check the box acknowledging that the template will create AWS Identity and Access Management (IAM) resources.

  9. 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 see a status of CREATE_COMPLETE in approximately five minutes.

    Note

    In addition to the primary AWS Lambda functions, this solution includes the custom-resource Lambda function, which runs only during initial configuration or when resources are updated or deleted. When running this solution, the custom-resource function is inactive. However, do not delete this function as it is necessary to manage associated resources.