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)

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='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.14.1.tar.gz (29.1 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.14.1-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cloudwanderer-0.14.1.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6

File hashes

Hashes for cloudwanderer-0.14.1.tar.gz
Algorithm Hash digest
SHA256 1adca71a08ab92c35d4fa89a16c6a34cd90cd11f6f15dc29a7be662c956a5d37
MD5 946fd72bec394b89a5706e4ae967e975
BLAKE2b-256 183c2330458ceca0c602f218b7e8148c85aab80de4c44ed4a5730c95a4112501

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cloudwanderer-0.14.1-py3-none-any.whl
  • Upload date:
  • Size: 38.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6

File hashes

Hashes for cloudwanderer-0.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 754885e7f199861f928465ac47f52bf3912f941d429a6a2b5ab377b2665daadc
MD5 3b450844795584ce7f71399451f8699c
BLAKE2b-256 1ddb7c685a91905ae8c1f6b5fbcbcc940b24a24da90867078d82fb6435d704d4

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