Setting up the Amazon DynamoDB Connector

Amazon DynamoDB Connector allows you to access the Amazon DynamoDB REST API through WSO2 EI.

Amazon DynamoDB makes it simple and cost-effective to store and retrieve any amount of data, as well as serve any level of request traffic. It uses a NoSQL database model, which is non-relational, allowing documents, graphs, and columnar among its data models.

Configuring message builders/formatters**

Before you start configuring the Amazon DynamoDB connector, you also need WSO2 MI, and we refer to that location as <PRODUCT_HOME>.

Specific message builders/formatters configuration needs to be enabled in the product as shown below before starting the WSO2 EI service.

If you are using EI7, you need to enable this property by adding the following to the /conf/deployment.toml file. You can further refer to the Working with Message Builders and Formatters and Product Configurations documentations.

[[custom_message_formatters]]
class="org.apache.synapse.commons.json.JsonStreamFormatter"
content_type = "application/x-amz-json-1.0"

[[custom_message_builders]]
class="org.apache.synapse.commons.json.JsonStreamBuilder"
content_type = "application/x-amz-json-1.0"

If you are using EI 6, you can enable this property by doing the following Axis2 configurations in the \repository\conf\axis2\axis2.xml file.

messageFormatters

<messageFormatter contentType="application/x-amz-json-1.0"
class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
messageBuilders
<messageBuilder contentType="application/x-amz-json-1.0"
class="org.apache.synapse.commons.json.JsonStreamBuilder"/>

Note: If you want to perform blocking invocations, ensure that the above builder and formatter are added and enabled in the \repository\conf\axis2\axis2_blocking_client.xml file.

Setting up the AWS Account and DynamoDB Environment

Please follow the steps mentioned in the Setting up the Amazon Lambda Environment document in order to create an Amazon account and obtain the access key id and secret access key.

Please find the following steps to navigate in to the Amazon DynamoDB using the AWS account.

  1. Sign in to the AWS Management Console and search Database section under Services.

Amazon Dynamodb aws console

  1. You can see the following operations and sub operations. The output in the AWS DynamoDB console are shown below.

    • Working with Items in Amazon DynamoDB
    • Working with Tables in Amazon DynamoDB

Amazon Dynamodb Table view

Top