PARALLAX

dynamodb_table

Create, update or delete AWS Dynamo DB tables

Collection: community.aws

Full Name: community.aws.dynamodb_table

Synopsis

Create, update or delete AWS Dynamo DB tables

Parameters

NameTypeRequiredDefaultDescription
access_keystr
aws_ca_bundlepath
aws_configdict
billing_modestr
debug_botocore_endpoint_logsboolfalse
endpoint_urlstr
hash_key_namestr
hash_key_typestr
indexeslist[]
namestryes
profilestr
purge_tagsbooltrue
range_key_namestr
range_key_typestr
read_capacityint
regionstr
secret_keystr
session_tokenstr
statestrpresent
table_classstr
tagsdict
validate_certsbooltrue
waitbooltrue
wait_timeoutint900
write_capacityint

Example

yaml
- name: Create dynamo table with hash and range primary key
  community.aws.dynamodb_table:
    name: my-table
    region: us-east-1
    hash_key_name: id
    hash_key_type: STRING
    range_key_name: create_time
    range_key_type: NUMBER
    read_capacity: 2
    write_capacity: 2
    tags:
        tag_name: tag_value

- name: Update capacity on existing dynamo table
  community.aws.dynamodb_table:
    name: my-table
    region: us-east-1
    read_capacity: 10
    write_capacity: 10

- name: Create pay-per-request table
  community.aws.dynamodb_table:
    name: my-table
    region: us-east-1
    hash_key_name: id
    hash_key_type: STRING
    billing_mode: PAY_PER_REQUEST

- name: set index on existing dynamo table
  community.aws.dynamodb_table:
    name: my-table
    region: us-east-1
    indexes:
        - name: NamedIndex
          type: global_include
          hash_key_name: id
          range_key_name: create_time
          includes:
            - other_field
            - other_field2
          read_capacity: 10
          write_capacity: 10

- name: Delete dynamo table
  community.aws.dynamodb_table:
    name: my-table
    region: us-east-1
    state: absent
Search
    ↑ ↓ move↵ openesc close