Configure Websites

Configure the Active-Primary Website

You will need the Amazon CloudFormation output parameter values from the Active-Primary stack to complete this section. For help, refer to the CloudFormation Outputs Primary Region section of the workshop.

1.1 Using your favorite editor, create a new file named config.json file. Initialize the document to the template provided below. Next, set the host property equal to the APIGURL output value from the Active-Primary CloudFormation stack. Remove the trailing slash (/) if one is present. Finally, set the region property to us-east-1.

{
    "host": "{{Replace with your APIGURL copied from above}}",
    "region": "us-east-1"
}

Your final config.json should look similar to this example.

{
    "host": "https://xxxxxxxx.execute-api.us-east-1.amazonaws.com/Production",
    "region": "us-east-1"
}

Upload the configuration to Amazon S3

2.1 Click S3 to navigate to the dashboard.

2.2 Click the bucket link that begins with active-primary-uibucket- .

2.3 Click the Upload button.

2.4 Click the Add Files button and specify the config.json file from the previous step.

2.5 In the Permissions Section section. Select the Specify Individual ACL permissions radio button. Enable the Read checkbox next to Everyone (public access) grantee.

2.6 Enable the I understand the effets of these changes on the specified objects. checkbox. Click the Upload button.

Configure the Passive-Secondary Website

You will need the Amazon CloudFormation output parameter values from the Passive-Secondary stack to complete this section. For help, refer to the CloudFormation Outputs Secondary Region section of the workshop.

3.1 Using your favorite editor, open the config.json file you just created on your local machine. Modify the document to set the host property equal to the APIGURL output value from the Passive-Secondary CloudFormation stack. Remove the trailing slash (/) if one is present. Finally, set the region property to us-west-1.

{
    "host": "{{Replace with your APIGURL copied from above}}",
    "region": "us-west-1"
}

Your final config.json should look similar to this example.

{
    "host": "https://xxxxxxxx.execute-api.us-west-1.amazonaws.com/Production",
    "region": "us-west-1"
}

Upload the configuration to Amazon S3

4.1 Click S3 to navigate to the dashboard.

4.2 Click the bucket name that begins with passive-secondary-uibucket-.

4.3 Click the Upload button.

4.4 Click the Add Files button and specify the config.json file from the previous step.

4.5 In the Permissions Section section. Select the Specify Individual ACL permissions radio button. Enable the Read checkbox next to Everyone (public access) grantee.

4.6 Enable the I understand the effets of these changes on the specified objects. checkbox. Click the Upload button.