Connection module for Amazon DynamoDB

New in version 2015.5.0.


This module accepts explicit DynamoDB credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at:

If IAM roles are not used you need to specify them either in a pillar or in the minion's config file:

key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

A region may also be specified in the configuration:

region: us-east-1

If a region is not specified, the default is us-east-1.

It's also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:

    key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
    region: us-east-1


salt.modules.boto_dynamodb.create_global_secondary_index(table_name, global_index, region=None, key=None, keyid=None, profile=None)

Creates a single global secondary index on a DynamoDB table.

CLI Example:

salt myminion boto_dynamodb.create_global_secondary_index table_name /
salt.modules.boto_dynamodb.create_table(table_name, region=None, key=None, keyid=None, profile=None, read_capacity_units=None, write_capacity_units=None, hash_key=None, hash_key_data_type=None, range_key=None, range_key_data_type=None, local_indexes=None, global_indexes=None)

Creates a DynamoDB table.

CLI Example:

salt myminion boto_dynamodb.create_table table_name /
region=us-east-1 /
hash_key=id /
hash_key_data_type=N /
range_key=created_at /
range_key_data_type=N /
read_capacity_units=1 /
salt.modules.boto_dynamodb.delete(table_name, region=None, key=None, keyid=None, profile=None)

Delete a DynamoDB table.

CLI Example:

salt myminion boto_dynamodb.delete table_name region=us-east-1
salt.modules.boto_dynamodb.describe(table_name, region=None, key=None, keyid=None, profile=None)

Describe a DynamoDB table.

CLI Example:

salt myminion boto_dynamodb.describe table_name region=us-east-1
salt.modules.boto_dynamodb.exists(table_name, region=None, key=None, keyid=None, profile=None)

Check to see if a table exists.

CLI Example:

salt myminion boto_dynamodb.exists table_name region=us-east-1
salt.modules.boto_dynamodb.extract_index(index_data, global_index=False)

Instantiates and returns an AllIndex object given a valid index configuration

CLI Example:

salt myminion boto_dynamodb.extract_index index
salt.modules.boto_dynamodb.list_tags_of_resource(resource_arn, region=None, key=None, keyid=None, profile=None)

Returns a dictionary of all tags currently attached to a given resource.

CLI Example:

salt myminion boto_dynamodb.list_tags_of_resource               resource_arn=arn:aws:dynamodb:us-east-1:012345678901:table/my-table

New in version 3006.0.

salt.modules.boto_dynamodb.tag_resource(resource_arn, tags, region=None, key=None, keyid=None, profile=None)

Sets given tags (provided as list or dict) on the given resource.

CLI Example:

salt myminion boto_dynamodb.tag_resource               resource_arn=arn:aws:dynamodb:us-east-1:012345678901:table/my-table               tags='{Name: my-table, Owner: Ops}'

New in version 3006.0.

salt.modules.boto_dynamodb.untag_resource(resource_arn, tag_keys, region=None, key=None, keyid=None, profile=None)

Removes given tags (provided as list) from the given resource.

CLI Example:

salt myminion boto_dynamodb.untag_resource               resource_arn=arn:aws:dynamodb:us-east-1:012345678901:table/my-table               tag_keys='[Name, Owner]'

New in version 3006.0.

salt.modules.boto_dynamodb.update(table_name, throughput=None, global_indexes=None, region=None, key=None, keyid=None, profile=None)

Update a DynamoDB table.

CLI Example:

salt myminion boto_dynamodb.update table_name region=us-east-1
salt.modules.boto_dynamodb.update_global_secondary_index(table_name, global_indexes, region=None, key=None, keyid=None, profile=None)

Updates the throughput of the given global secondary indexes.

CLI Example:

salt myminion boto_dynamodb.update_global_secondary_index table_name /