Skip to main content

AWSToolbox logo
Github Build Status License Created
Release Released Commits since release

Overview

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.

Features

  • Fetching AWS Regions:

    • Retrieve a list of all AWS regions, optionally including/excluding regions based on account opt-in status.
    • Supports fetching detailed information about each region.
  • Region Details:

    • Fetch geographical location descriptions for specific AWS regions from the AWS Systems Manager (SSM) Parameter Store.
    • Utilizes concurrent threading for enhanced performance when fetching multiple region details.
  • Filtering:

    • Apply include and exclude filters to customize the list of AWS regions returned.

Functions

Public Functions

  • get_region_list
    • Retrieves a list of AWS regions.
    • Parameters:
      • 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.
    • Returns:
      • If details=True: Sorted list of dictionaries containing detailed region information.
      • If details=False: Sorted list of region names as strings.
    • Raises:
      • RegionListingError: If an error occurs during region retrieval or processing.

Usage

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.

Example

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']}")

Notes

  • Ensure AWS credentials are properly configured for API access.
  • Error handling is integrated to manage exceptions during AWS operations.
  • Threading is utilized for efficient concurrent operations when fetching region details.

For further details and customization options, refer to the function docstrings and the module's implementation.


Release files for wolfsoftware.get-aws-regions 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wolfsoftware.get-aws-regions 0.1.2
File Size Uploaded
wolfsoftware_get_aws_regions-0.1.2.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wolfsoftware.get-aws-regions 0.1.2
File Interpreter ABI Platform
wolfsoftware.get_aws_regions-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / wolfsoftware_get_aws_regions-0.1.2.tar.gz

Download URL wolfsoftware_get_aws_regions-0.1.2.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0e274f9a6d8b31c2c89d8ca0f830ad587412f825e9e7930de3911ce492c32e97
BLAKE2b-256 checksum
How to use checksums
4f7d7ad002f4853b642facb2e042516811a2ad96f12fefd96f0c1a6de8250f78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / wolfsoftware.get_aws_regions-0.1.2-py3-none-any.whl

Download URL wolfsoftware.get_aws_regions-0.1.2-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd9ad950fa8fd29953f4123f8e4d16d689cba0a5622eafa9062ca101838625d5
BLAKE2b-256 checksum
How to use checksums
cbf4666d8af74f3d4fa194a3592990c9e450a6c42a927c6e2f12370e4a858de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page