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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| billing_mode | str | |||
| debug_botocore_endpoint_logs | bool | false | ||
| endpoint_url | str | |||
| hash_key_name | str | |||
| hash_key_type | str | |||
| indexes | list | [] | ||
| name | str | yes | ||
| profile | str | |||
| purge_tags | bool | true | ||
| range_key_name | str | |||
| range_key_type | str | |||
| read_capacity | int | |||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| state | str | present | ||
| table_class | str | |||
| tags | dict | |||
| validate_certs | bool | true | ||
| wait | bool | true | ||
| wait_timeout | int | 900 | ||
| write_capacity | int |
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