github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/caches/aws_dynamodb.md (about)

     1  ---
     2  title: aws_dynamodb
     3  type: cache
     4  status: stable
     5  ---
     6  
     7  <!--
     8       THIS FILE IS AUTOGENERATED!
     9  
    10       To make changes please edit the contents of:
    11       lib/cache/aws_dynamodb.go
    12  -->
    13  
    14  import Tabs from '@theme/Tabs';
    15  import TabItem from '@theme/TabItem';
    16  
    17  
    18  Stores key/value pairs as a single document in a DynamoDB table. The key is
    19  stored as a string value and used as the table hash key. The value is stored as
    20  a binary value using the `data_key` field name.
    21  
    22  Introduced in version 3.36.0.
    23  
    24  
    25  <Tabs defaultValue="common" values={[
    26    { label: 'Common', value: 'common', },
    27    { label: 'Advanced', value: 'advanced', },
    28  ]}>
    29  
    30  <TabItem value="common">
    31  
    32  ```yaml
    33  # Common config fields, showing default values
    34  label: ""
    35  aws_dynamodb:
    36    table: ""
    37    hash_key: ""
    38    data_key: ""
    39    region: eu-west-1
    40  ```
    41  
    42  </TabItem>
    43  <TabItem value="advanced">
    44  
    45  ```yaml
    46  # All config fields, showing default values
    47  label: ""
    48  aws_dynamodb:
    49    table: ""
    50    hash_key: ""
    51    data_key: ""
    52    consistent_read: false
    53    ttl: ""
    54    ttl_key: ""
    55    region: eu-west-1
    56    endpoint: ""
    57    credentials:
    58      profile: ""
    59      id: ""
    60      secret: ""
    61      token: ""
    62      role: ""
    63      role_external_id: ""
    64    max_retries: 3
    65    backoff:
    66      initial_interval: 1s
    67      max_interval: 5s
    68      max_elapsed_time: 30s
    69  ```
    70  
    71  </TabItem>
    72  </Tabs>
    73  
    74  A prefix can be specified to allow multiple cache types to share a single
    75  DynamoDB table. An optional TTL duration (`ttl`) and field
    76  (`ttl_key`) can be specified if the backing table has TTL enabled.
    77  
    78  Strong read consistency can be enabled using the `consistent_read`
    79  configuration field.
    80  
    81  ### Credentials
    82  
    83  By default Benthos will use a shared credentials file when connecting to AWS
    84  services. It's also possible to set them explicitly at the component level,
    85  allowing you to transfer data across accounts. You can find out more
    86  [in this document](/docs/guides/cloud/aws).
    87  
    88  ## Fields
    89  
    90  ### `table`
    91  
    92  The table to store items in.
    93  
    94  
    95  Type: `string`  
    96  Default: `""`  
    97  
    98  ### `hash_key`
    99  
   100  The key of the table column to store item keys within.
   101  
   102  
   103  Type: `string`  
   104  Default: `""`  
   105  
   106  ### `data_key`
   107  
   108  The key of the table column to store item values within.
   109  
   110  
   111  Type: `string`  
   112  Default: `""`  
   113  
   114  ### `consistent_read`
   115  
   116  Whether to use strongly consistent reads on Get commands.
   117  
   118  
   119  Type: `bool`  
   120  Default: `false`  
   121  
   122  ### `ttl`
   123  
   124  An optional TTL to set for items, calculated from the moment the item is cached.
   125  
   126  
   127  Type: `string`  
   128  Default: `""`  
   129  
   130  ### `ttl_key`
   131  
   132  The column key to place the TTL value within.
   133  
   134  
   135  Type: `string`  
   136  Default: `""`  
   137  
   138  ### `region`
   139  
   140  The AWS region to target.
   141  
   142  
   143  Type: `string`  
   144  Default: `"eu-west-1"`  
   145  
   146  ### `endpoint`
   147  
   148  Allows you to specify a custom endpoint for the AWS API.
   149  
   150  
   151  Type: `string`  
   152  Default: `""`  
   153  
   154  ### `credentials`
   155  
   156  Optional manual configuration of AWS credentials to use. More information can be found [in this document](/docs/guides/cloud/aws).
   157  
   158  
   159  Type: `object`  
   160  
   161  ### `credentials.profile`
   162  
   163  A profile from `~/.aws/credentials` to use.
   164  
   165  
   166  Type: `string`  
   167  Default: `""`  
   168  
   169  ### `credentials.id`
   170  
   171  The ID of credentials to use.
   172  
   173  
   174  Type: `string`  
   175  Default: `""`  
   176  
   177  ### `credentials.secret`
   178  
   179  The secret for the credentials being used.
   180  
   181  
   182  Type: `string`  
   183  Default: `""`  
   184  
   185  ### `credentials.token`
   186  
   187  The token for the credentials being used, required when using short term credentials.
   188  
   189  
   190  Type: `string`  
   191  Default: `""`  
   192  
   193  ### `credentials.role`
   194  
   195  A role ARN to assume.
   196  
   197  
   198  Type: `string`  
   199  Default: `""`  
   200  
   201  ### `credentials.role_external_id`
   202  
   203  An external ID to provide when assuming a role.
   204  
   205  
   206  Type: `string`  
   207  Default: `""`  
   208  
   209  ### `max_retries`
   210  
   211  The maximum number of retries before giving up on the request. If set to zero there is no discrete limit.
   212  
   213  
   214  Type: `int`  
   215  Default: `3`  
   216  
   217  ### `backoff`
   218  
   219  Control time intervals between retry attempts.
   220  
   221  
   222  Type: `object`  
   223  
   224  ### `backoff.initial_interval`
   225  
   226  The initial period to wait between retry attempts.
   227  
   228  
   229  Type: `string`  
   230  Default: `"1s"`  
   231  
   232  ### `backoff.max_interval`
   233  
   234  The maximum period to wait between retry attempts.
   235  
   236  
   237  Type: `string`  
   238  Default: `"5s"`  
   239  
   240  ### `backoff.max_elapsed_time`
   241  
   242  The maximum period to wait before retry attempts are abandoned. If zero then no limit is used.
   243  
   244  
   245  Type: `string`  
   246  Default: `"30s"`  
   247  
   248