Storage Connector Reference

DynamoDB Connector

class cloudwanderer.storage_connectors.DynamoDbConnector(table_name='cloud_wanderer', endpoint_url=None, boto3_session=None, number_of_shards=10)

CloudWanderer Storage Connector for DynamoDB.

  • table_name (str) – The name of the table to store resources in.

  • endpoint_url (str) – Optional override endpoint url for DynamoDB.

  • boto3_session (boto3.Session) – Optional boto3 session to use to interact with DynamoDB. Useful if your DynamoDB table is in a different account/region to your configured defaults.

  • number_of_shards (int) – The number of shards to break records across low-cardinality indices. Prevents hot-partitions. If you don’t know what this means, ignore this setting.


Delete the resource and all its resource attributes from DynamoDB.

delete_resource_of_type_in_account_region(service, resource_type, account_id, region, urns_to_keep=None)

Delete resources of type in account id unless in list of URNs.


Create the DynamoDB Database.


Return raw data from all DynamoDB table records (not just resources).


Return all resources in account.


account_id (str) – AWS Account ID


Return the resource with the specified cloudwanderer.AwsUrn.


urn (cloudwanderer.AwsUrn) – The AWS URN of the resource to return

read_resource_of_type(service, resource_type)

Return all resources of type.

  • service (str) – Service name (e.g. ec2)

  • resource_type (str) – Resource Type (e.g. instance)

read_resource_of_type_in_account(service, resource_type, account_id)

Return all resources of the specified type in the specified AWS account.

  • service (str) – Service name, e.g. ec2

  • resource_type (str) – Resouce type, e.g. instance

  • account_id (str) – AWS Account ID

write_resource(urn, resource)

Write the specified resource to DynamoDB.

  • urn (cloudwanderer.AwsUrn) – The URN of the resource.

  • resource – The boto3 Resource object representing the resource.

write_resource_attribute(urn, attribute_type, resource_attribute)

Write the specified resource attribute to DynamoDb.