salt.modules.boto_dynamodb

Connection module for Amazon DynamoDB

New in version 2015.5.0.

configuration

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:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html

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

keyid: GKTADJGHEIQSXMKKRBJ08H
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:

myprofile:
    keyid: GKTADJGHEIQSXMKKRBJ08H
    key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
    region: us-east-1
depends

boto

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: .. code-block:: bash

salt myminion boto_dynamodb.create_global_secondary_index table_name / index_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 /
write_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.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: .. code-block:: bash

salt myminion boto_dynamodb.update_global_secondary_index table_name / indexes