Skip to main content

A Python package which wanders across your AWS account and records your resources in DynamoDB

Project description

https://user-images.githubusercontent.com/803607/101322139-7111b800-385e-11eb-9277-c6bf3a580987.png

PyPI GitHub Workflow Status (branch) Documentation Status

A Python package which wanders across your AWS account and records your resources in DynamoDB

Installation

pip install cloudwanderer

Usage

Start a local dynamodb

$  docker run -p 8000:8000 amazon/dynamodb-local

Open up python and import and initialise CloudWanderer

>>> import logging
>>> from cloudwanderer import CloudWanderer
>>> from cloudwanderer.storage_connectors import DynamoDbConnector
>>> storage_connector = DynamoDbConnector(
...     endpoint_url='http://localhost:8000'
... )
>>> wanderer = CloudWanderer(storage_connectors=[storage_connector])
>>> logging.basicConfig(level='INFO')
>>> storage_connector.init()

Get all the resources from your AWS account and save them to your local dynamodb.

>>> wanderer.write_resources()

Get a list of VPCs back.

>>> vpcs = storage_connector.read_resources(service='ec2', resource_type='vpc')
>>> first_vpc = next(vpcs)
>>> first_vpc.urn
URN(account_id='123456789012', region='us-east-1', service='ec2', resource_type='vpc', resource_id_parts=['vpc-11111111'])

Load the full details of the resource.

>>> first_vpc.load()
>>> first_vpc.cidr_block
'172.31.0.0/16'
>>> first_vpc.instance_tenancy
'default'
>>> first_vpc.is_default
True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudwanderer-0.17.0.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloudwanderer-0.17.0-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

Details for the file cloudwanderer-0.17.0.tar.gz.

File metadata

  • Download URL: cloudwanderer-0.17.0.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for cloudwanderer-0.17.0.tar.gz
Algorithm Hash digest
SHA256 da2ec9d35aa1d6ffc1dfc3fffaf8322d034ea7c69d20f51ea576087d3c9ceaeb
MD5 7ceda0ead3e3993f747a9a344eb1b5ac
BLAKE2b-256 6caa48e2364da0aec90b6c80bc36bf690467c80537e1754d6a5582afa5adccd6

See more details on using hashes here.

File details

Details for the file cloudwanderer-0.17.0-py3-none-any.whl.

File metadata

  • Download URL: cloudwanderer-0.17.0-py3-none-any.whl
  • Upload date:
  • Size: 43.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for cloudwanderer-0.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c56c62d516d3bedc027667475c0cde79bca29ea6810aa332bb37011c697911f
MD5 70eff218bf1638ac22e8fafb928f319c
BLAKE2b-256 3ac9126c76252dd7ae136ad656414cbcdabf32d0518b81f4c8dae9dd8c9d6920

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page