This module provides a simple method for retrieving and processing AWS region information. This is a core component for all of the tools in our AWS Toolbox.
Fetching AWS Regions:
Region Details:
Filtering:
include_list: Optional list of regions to include.exclude_list: Optional list of regions to exclude.all_regions: Boolean flag to include all regions (default: True).details: Boolean flag to return detailed information about each region (default: False).profile_name: String to specify the name of the profile to use.details=True: Sorted list of dictionaries containing detailed region information.details=False: Sorted list of region names as strings.RegionListingError: If an error occurs during region retrieval or processing.This module is designed to be used as part of the wolfsoftware.get-aws-regions package. The primary function, get_region_list, allows flexible retrieval and customization of AWS region information based on user-defined criteria.
from wolfsoftware.get_aws_regions import get_region_list
# Example usage: Retrieve all regions and print their names
regions = get_region_list(details=False)
print("AWS Regions:", regions)
# Example usage: Retrieve detailed information for selected regions
detailed_regions = get_region_list(include_list=['us-west-1', 'us-east-1'], details=True)
for region in detailed_regions:
print(f"Region: {region['RegionName']}, Location: {region['GeographicalLocation']}")For further details and customization options, refer to the function docstrings and the module's implementation.