Skip to main content

Amazon CloudWatch Internet Monitor Client Library for Python

A high-level client representing Amazon CloudWatch Internet Monitor.

Getting Started

  • Minimum requirements -- Python 3.11 (or later) and pip
  • Download -- Download the latest preview release or pick it up from pip:
pip install internetmonitor-client-python

Using the CloudWatch Internet Monitor Client

>>> from internetmonitor_client import CloudWatchInternetMonitorClient
>>> monitor_name  = 'MyVPCMonitor'
>>> client = CloudWatchInternetMonitorClient(monitor_name)

>>> # Get routing suggestions for AS 12345
>>> routing_suggestions = client.get_routing_suggestions(
    filter_parameters=[
        {"Field": "dns_resolver_asn", "Operator": "EQUALS", "Values": ["12345"]},
    ]
)
>>> next(routing_suggestions)
{'dns_resolver_ip': '162.158.197.82', 'dns_resolver_asn': 12345, 'dns_resolver_isp': 'isp name', 'ipv4_prefixes': ['71.134.0.0/15'], 'current_aws_location': 'us-west-2', 'current_latency': 93.4, 'proposed_aws_location': 'us-east-1', 'proposed_latency': 36.2}

>>> # Get suggestions to reduce latency for top locations
>>> top_locations = client.get_top_locations()
>>> next(top_locations)
{'aws_location': 'us-west-2', 'city': 'Berlin', 'metro': 'N/A', 'subdivision': 'Land Berlin', 'country': 'Germany', 'asn': 1234, 'availability': 100.0, 'min_availability': 100.0, 'performance': 100.0, 'min_performance': 100.0, 'bytes_in': 34443600, 'bytes_out': 96288120, 'percentage_of_total_traffic': 0.32, 'current_fbl': 209, 'min_fbl': 206, 'max_fbl': 214, 'best_ec2': 47, 'best_ec2_region': 'eu-central-1', 'best_cf_fbl': 34}

>>> # Get overall traffic suggestions details for us-west-2
>>> traffic_suggestions = client.get_overall_traffic_suggestions_details(
    filter_parameters=[
        {"Field": "current_aws_location", "Operator": "EQUALS", "Values": ["us-west-2"]},
    ]
)
>>> next(traffic_suggestions)
{'city': 'Las Vegas', 'metro': 'Las Vegas', 'subdivision': 'Nevada', 'country': 'United States', 'asn': 1234, 'traffic': 74499564, 'current_aws_location': 'us-west-2', 'fbl_data': {'ap-south-2': 328, 'ap-south-1': 316, 'eu-south-1': 200, 'eu-south-2': 202, 'us-east-1-dfw-2a': 60, 'me-central-1': 307, 'il-central-1': 236, 'ca-central-1': 96, 'us-east-1-atl-2a': 77, 'eu-central-1': 191, 'eu-central-2': 197, 'us-west-1': 34, 'us-west-2': 47, 'af-south-1': 339, 'eu-west-3': 182, 'eu-north-1': 190, 'eu-west-2': 184, 'eu-west-1': 190, 'us-west-2-lax-1b': 33, 'us-west-2-lax-1a': 33, 'ap-northeast-3': 140, 'ap-northeast-2': 159, 'ap-northeast-1': 139, 'me-south-1': 277, 'af-south-1-los-1a': 337, 'sa-east-1': 189, 'us-east-1-qro-1a': 80, 'ap-east-1': 188, 'us-east-1-lim-1a': 171, 'CloudFront': 14, 'ca-west-1': 76, 'ap-southeast-1': 188, 'us-east-1-bue-1a': 228, 'ap-southeast-2': 170, 'ap-southeast-3': 203, 'ap-southeast-4': 182, 'us-east-1': 78, 'ap-southeast-5': 208, 'us-east-2': 72, 'us-east-1-mci-1a': 80, 'us-east-1-mia-2a': 102}}

To learn more, visit the Cloud Watch Internet Monitor user guide documentation.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Release files for internetmonitor-client-python 1.0

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

Source distribution (sdist)

Source distribution for internetmonitor-client-python 1.0
File Size Uploaded
internetmonitor_client_python-1.0.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for internetmonitor-client-python 1.0
File Interpreter ABI Platform
internetmonitor_client_python-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.7 kB

Release files / internetmonitor_client_python-1.0.tar.gz

Download URL internetmonitor_client_python-1.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
923af84e59547a2788e20cd6c5f4cbe5f2d8a6b12f047101b4eded281b205b36
BLAKE2b-256 checksum
How to use checksums
df8a07ceea483901cfbc956e35e8c412c3d205e4b1c7a7aa09c254d278a4587b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release files / internetmonitor_client_python-1.0-py3-none-any.whl

Download URL internetmonitor_client_python-1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4490f2a4be88fb1455dbd84293324d0b451d907bb299a00e66363bec534ccb1
BLAKE2b-256 checksum
How to use checksums
4161b88cf07d64027457980b2deec7a6982300d2ffa634b3287e537825c66680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release history Release notifications | RSS feed

This release

1.0 This release

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