python/example_code/route53-recovery-cluster/README.md
Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Route 53 Application Recovery Controller.
<!--custom.overview.start--> <!--custom.overview.end-->Route 53 ARC gives you insights about whether your applications and resources are ready for recovery, and helps you move traffic across AWS Regions or away from Availability Zones for application disaster recovery.
For prerequisites, see the README in the python folder.
Install the packages required by these examples by running the following in a virtual environment:
python -m pip install -r requirements.txt
Code excerpts that show you how to call individual service functions.
<!--custom.examples.start--> <!--custom.examples.end-->Run this example at a command prompt with the following command.
python routing_control_state.py [routing_control_arn] [cluster_endpoints_json_file]
A routing control Amazon Resource Name (ARN) looks something like this:
arn:aws:route53-recovery-control::123456789012:controlpanel/ffa374e10db34a90bc56EXAMPLE/routingcontrol/60649aEXAMPLE
The Region within the cluster endpoint and the Region you provide with that endpoint must match. A cluster endpoints JSON looks something like this:
{"ClusterEndpoints":
[{"Endpoint": "https://11111111.route53-recovery-cluster.us-east-1.amazonaws.com/v1",
"Region": "us-east-1"},
{"Endpoint": "https://22222222.route53-recovery-cluster.ap-northeast-1.amazonaws.com/v1",
"Region": "ap-northeast-1"},
{"Endpoint": "https://33333333.route53-recovery-cluster.ap-southeast-2.amazonaws.com/v1",
"Region": "ap-southeast-2"},
{"Endpoint": "https://44444444.route53-recovery-cluster.us-west-2.amazonaws.com/v1",
"Region": "us-west-2"},
{"Endpoint": "https://55555555.route53-recovery-cluster.eu-west-1.amazonaws.com/v1",
"Region": "eu-west-1"}]}
⚠ Running tests might result in charges to your AWS account.
To find instructions for running these tests, see the README
in the python folder.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0