python/example_code/elastic-load-balancing/README.md
Shows how to use the AWS SDK for Python (Boto3) to work with Elastic Load Balancing - Version 2.
<!--custom.overview.start-->Most of the example code for Elastic Load Balancing can be found in the
python/cross_service/resilient_service folder,
which contains the Build and manage a resilient service
scenario.
Elastic Load Balancing - Version 2 automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones.
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
DescribeLoadBalancers)Code excerpts that show you how to call individual service functions.
Code examples that show you how to accomplish a specific task by calling multiple functions within the same service.
<!--custom.examples.start--> <!--custom.examples.end-->This example shows you how to get started using Elastic Load Balancing - Version 2.
python hello.py
This example shows you how to create a load-balanced web service that returns book, movie, and song recommendations. The example shows how the service responds to failures, and how to restructure the service for more resilience when failures occur.
Start the example by running the following at a command prompt:
python ../../cross_service/resilient_service/runner.py
Complete details and instructions on how to run this example can be found in the README for the example.
<!--custom.scenarios.cross_ResilientService.end-->⚠ 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