boto3_dynamodb¶
Manage DynamoDB Tables using boto3.¶
Renamed from
boto_dynamodbtoboto3_dynamodband updated to call the refactoredboto3_dynamodbexecution module.
Create and destroy DynamoDB tables. Be aware that this interacts with Amazon’s services, and so may incur charges.
- depends:
boto3 >= 1.28.0
botocore >= 1.31.0
This module uses boto3, which can be installed via package, or pip.
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 the minion’s config file or as a profile. For example, to specify them in the minion’s config file:
dynamodb.keyid: GKTADJGHEIQSXMKKRBJ08H
dynamodb.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
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
ensure-present:
boto3_dynamodb.present:
- name: example
- region: us-east-1
- profile: myprofile
Added in version 1.0.0.
- exception saltext.boto3.states.boto3_dynamodb.GsiNotUpdatableError[source]¶
Raised when a global secondary index cannot be updated.
- saltext.boto3.states.boto3_dynamodb.__virtual__()[source]¶
Only load if the boto3_dynamodb execution module is available.
- saltext.boto3.states.boto3_dynamodb.present(name=None, table_name=None, region=None, key=None, keyid=None, profile=None, read_capacity_units=None, write_capacity_units=None, alarms=None, alarms_from_pillar='boto3_dynamodb_alarms', hash_key=None, hash_key_data_type=None, range_key=None, range_key_data_type=None, local_indexes=None, global_indexes=None, backup_configs_from_pillars='boto3_dynamodb_backup_configs')[source]¶
Ensure the DynamoDB table exists and matches the specified configuration.
Example:
ensure-present: boto3_dynamodb.present: - name: example