DynamoDB
Kubemq dynamodb target connector allows services using kubemq server to access aws dynamodb service.

Prerequisites

The following required to run the aws-dynamodb target connector:
  • kubemq cluster
  • aws account with dynamodb active service
  • kubemq-source deployment

Configuration

dynamodb target connector configuration properties:
Properties Key
Required
Description
Example
aws_key
yes
aws key
aws key supplied by aws
aws_secret_key
yes
aws secret key
aws secret key supplied by aws
region
yes
region
aws region
token
no
aws token ("default" empty string
aws token
Example:
1
bindings:
2
- name: kubemq-query-aws-dynamodb
3
source:
4
kind: kubemq.query
5
name: kubemq-query
6
properties:
7
address: "kubemq-cluster:50000"
8
client_id: "kubemq-query-aws-dynamodb"
9
auth_token: ""
10
channel: "query.aws.dynamodb"
11
group: ""
12
auto_reconnect: "true"
13
reconnect_interval_seconds: "1"
14
max_reconnects: "0"
15
target:
16
kind: aws.dynamodb
17
name: aws-dynamodb
18
properties:
19
aws_key: "id"
20
aws_secret_key: 'json'
21
region: "region"
22
token: ""
Copied!

Usage

List Tables

list all tables under dynamodb.
List Tables:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"list_tables"
Example:
1
{
2
"metadata": {
3
"method": "list_tables"
4
},
5
"data": null
6
}
Copied!

Create Table

create a new table under dynamodb.
Create Table:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"create_table"
data
yes
dynamodb.CreateTableInput as json
"string"
Example:
1
{
2
"metadata": {
3
"method": "create_table"
4
},
5
"data": "ewoJCQkJCSJBdHRyaWJ1dGVEZWZpbml0aW9ucyI6IFsKCQkJCQkJewoJCQkJCQkJIkF0dHJpYnV0ZU5hbWUiOiAiWWVhciIsCgkJCQkJCQkiQXR0cmlidXRlVHlwZSI6ICJOIgoJCQkJCQl9LAoJCQkJCQl7CgkJCQkJCQkiQXR0cmlidXRlTmFtZSI6ICJUaXRsZSIsCgkJCQkJCQkiQXR0cmlidXRlVHlwZSI6ICJTIgoJCQkJCQl9CgkJCQkJXSwKCQkJCQkiQmlsbGluZ01vZGUiOiBudWxsLAoJCQkJCSJHbG9iYWxTZWNvbmRhcnlJbmRleGVzIjogbnVsbCwKCQkJCQkiS2V5U2NoZW1hIjogWwoJCQkJCQl7CgkJCQkJCQkiQXR0cmlidXRlTmFtZSI6ICJZZWFyIiwKCQkJCQkJCSJLZXlUeXBlIjogIkhBU0giCgkJCQkJCX0sCgkJCQkJCXsKCQkJCQkJCSJBdHRyaWJ1dGVOYW1lIjogIlRpdGxlIiwKCQkJCQkJCSJLZXlUeXBlIjogIlJBTkdFIgoJCQkJCQl9CgkJCQkJXSwKCQkJCQkiTG9jYWxTZWNvbmRhcnlJbmRleGVzIjogbnVsbCwKCQkJCQkiUHJvdmlzaW9uZWRUaHJvdWdocHV0IjogewoJCQkJCQkiUmVhZENhcGFjaXR5VW5pdHMiOiAxMCwKCQkJCQkJIldyaXRlQ2FwYWNpdHlVbml0cyI6IDEwCgkJCQkJfSwKCQkJCQkiU1NFU3BlY2lmaWNhdGlvbiI6IG51bGwsCgkJCQkJIlN0cmVhbVNwZWNpZmljYXRpb24iOiBudWxsLAoJCQkJCSJUYWJsZU5hbWUiOiAibXl0YWJsZW5hbWUiLAoJCQkJCSJUYWdzIjogbnVsbAoJCQkJfQ=="
6
}
Copied!

Delete Table

delete a table under dynamodb.
Delete Table:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete_table"
table_name
yes
table name to delete
"string"
Example:
1
{
2
"metadata": {
3
"method": "delete_table",
4
"table_name": "my_table_name"
5
},
6
"data": null
7
}
Copied!

Insert Item

insert item to table under dynamodb.
Insert Item :
Metadata Key
Required
Description
Possible values
method
yes
type of method
"insert_item"
table_name
yes
table name to delete
"string"
data
yes
dynamodb.AttributeValue as json
"string"
Example:
1
{
2
"metadata": {
3
"method": "insert_item",
4
"table_name": "my_table_name"
5
},
6
"data": "ewoJCSJQbG90IjogewoJCQkiUyI6ICJzb21lIHBsb3QiCgkJfSwKCQkiUmF0aW5nIjogewoJCQkiTiI6ICIxMC4xIgoJCX0sCgkJIlRpdGxlIjogewoJCQkiUyI6ICJLdWJlTVEgdGVzdCBNb3ZpZSIKCQl9LAoJCSJZZWFyIjogewoJCQkiTiI6ICIyMDIwIgoJCX0KCX0="
7
}
Copied!

Get Item

get an item from a table under dynamodb.
Get Item :
Metadata Key
Required
Description
Possible values
method
yes
type of method
"get_item"
data
yes
dynamodb.GetItemInput as json
"string"
Example:
1
{
2
"metadata": {
3
"method": "get_item"
4
},
5
"data": "ewoJCQkiQXR0cmlidXRlc1RvR2V0IjogbnVsbCwKCQkJIkNvbnNpc3RlbnRSZWFkIjogbnVsbCwKCQkJIkV4cHJlc3Npb25BdHRyaWJ1dGVOYW1lcyI6IG51bGwsCgkJCSJLZXkiOiB7CgkJCQkiVGl0bGUiOiB7CgkJCQkJIlMiOiAiS3ViZU1RIHRlc3QgTW92aWUiCgkJCQl9LAoJCQkJIlllYXIiOiB7CgkJCQkJIk4iOiAiMjAyMCIKCQkJCX0KCQkJfSwKCQkJIlByb2plY3Rpb25FeHByZXNzaW9uIjogbnVsbCwKCQkJIlJldHVybkNvbnN1bWVkQ2FwYWNpdHkiOiBudWxsLAoJCQkiVGFibGVOYW1lIjogIm15dGFibGVuYW1lIgoJCX0="
6
}
Copied!

Update Item

update an item from a table under dynamodb.
Update Item :
Metadata Key
Required
Description
Possible values
method
yes
type of method
"update_item"
data
yes
dynamodb.UpdateItemInput as json
"string"
Example:
1
{
2
"metadata": {
3
"method": "update_item"
4
},
5
"data": "ewoJCQkiRXhwcmVzc2lvbkF0dHJpYnV0ZVZhbHVlcyI6IHsKCQkJCSI6ciI6IHsKCQkJCQkiTiI6ICIwLjkiCgkJCQl9CgkJCX0sCgkJCSJLZXkiOiB7CgkJCQkiVGl0bGUiOiB7CgkJCQkJIlMiOiAiS3ViZU1RIHRlc3QgTW92aWUiCgkJCQl9LAoJCQkJIlllYXIiOiB7CgkJCQkJIk4iOiAiMjAyMCIKCQkJCX0KCQkJfSwKCQkJIlJldHVyblZhbHVlcyI6ICJVUERBVEVEX05FVyIsCgkJCSJUYWJsZU5hbWUiOiAibXl0YWJsZW5hbWUiLAoJCQkiVXBkYXRlRXhwcmVzc2lvbiI6ICJzZXQgUmF0aW5nID0gOnIiCgkJfQ=="
6
}
Copied!

Delete Item

delete an item from a table under dynamodb.
Delete Item :
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete_item"
data
yes
dynamodb.DeleteItemInput as json
"string"
Example:
1
{
2
"metadata": {
3
"method": "delete_item"
4
},
5
"data": "ewoJCQkJCSJLZXkiOiB7CgkJCQkJCSJUaXRsZSI6IHsKCQkJCQkJCSJTIjogIkt1YmVNUSB0ZXN0IE1vdmllIgoJCQkJCQl9LAoJCQkJCQkiWWVhciI6IHsKCQkJCQkJCSJOIjogIjIwMjAiCgkJCQkJCX0KCQkJCQl9LAoJCQkJCSJUYWJsZU5hbWUiOiAibXl0YWJsZW5hbWUiCgkJCQl9"
6
}
Copied!
Last modified 11mo ago