Quick start
Prerequisites
The prerequisites for connecting an AWS DynamoDB source connector to external systems include:- Enable stream to the DynamoDB in AWS, it will show a
Latest stream ARNafter the stream is turned on. - Create an AWS User and an
AccessKey(Please record the value ofAccessKeyand itsSecretKey). - Assign the following permissions to the AWS User:
- AmazonDynamoDBFullAccess
- CloudWatch:PutMetricData: it is required because this connector will periodically send metrics to CloudWatch.
1. Create a connector
The following command shows how to use pulsarctl to create abuiltin connector. If you want to create a non-builtin connector,
you need to replace --source-type dynamodb with --archive /path/to/pulsar-io-dynamodb.nar. You can find the button to download the nar package at the beginning of the document.
If you are a StreamNative Cloud user, you need set up your environment first.
--source-config is the minimum necessary configuration for starting this connector, and it is a JSON string. You need to substitute the relevant parameters with your own.
If you want to configure more parameters, see Configuration Properties for reference.
You can also choose to use a variety of other tools to create a connector:
- pulsar-admin: The command arguments for
pulsar-adminare similar to those ofpulsarctl. You can find an example for StreamNative Cloud Doc. - RestAPI: You can find an example for StreamNative Cloud Doc.
- Terraform: You can find an example for StreamNative Cloud Doc.
- Function Mesh: The docker image can be found at the beginning of the document.
2. Insert row to DynamoDB table
3. Show data using Pulsar client
Configuration Properties
This table outlines the properties of an AWS DynamoDB source connector.| Name | Required | Sensitive | Default | Description |
|---|---|---|---|---|
awsEndpoint | false | false | None | Dynamodb streams end-point url. |
awsRegion | true | false | ” | Appropriate aws region. E.g. us-west-1, us-west-2. |
awsDynamodbStreamArn | true | false | ” | the Dynamodb stream arn. |
awsCredentialPluginName | false | false | None | Fully-Qualified class name of implementation of AwsCredentialProviderPlugin.. |
awsCredentialPluginParam | false | true | ” “ | The JSON parameter to initialize AwsCredentialsProviderPlugin. |
initialPositionInStream | false | false | LATEST | Used to specify the position in the stream where the connector should start from, The available options are: - AT_TIMESTAMP: Start from the record at or after the specified timestamp - LATEST: Start after the most recent data record (fetch new data) - TRIM_HORIZON: Start from the oldest available data record |
startAtTime | false | false | None | If the initalPositionInStream is set to ‘AT_TIMESTAMP’, then this property specifies the point in time to start consumption. |
applicationName | false | false | ”pulsar-dynamodb” | Name of the dynamodb consumer application. |
checkpointInterval | false | false | 60000 | The frequency of the stream checkpointing (in milliseconds). |
backoffTime | false | false | 3000 | The amount of time to delay between requests when the connector encounters a Throttling exception from dynamodb (in milliseconds). |
numRetries | false | false | 3 | The number of re-attempts to make when the connector encounters an exception while trying to set a checkpoint. |
receiveQueueSize | false | false | 1000 | The maximum number of AWS Records that can be buffered inside the connector. |
dynamoEndpoint | false | false | None | Dynamo end-point url. |
cloudwatchEndpoint | false | false | None | Cloudwatch end-point url. |
Configure AwsCredentialProviderPlugin
AWS DynamoDB source connector allows you to use three ways to connect to AWS DynamoDB by configuringawsCredentialPluginName.
-
Leave
awsCredentialPluginNameempty to get the connector authenticated by passingaccessKeyandsecretKeyinawsCredentialPluginParam. -
Set
awsCredentialPluginNametoorg.apache.pulsar.io.aws.AwsDefaultProviderChainPluginto use the default AWS provider chain. With this option, you don’t need to configureawsCredentialPluginParam. For more information, see AWS documentation. -
Set
awsCredentialPluginNametoorg.apache.pulsar.io.aws.STSAssumeRoleProviderPluginto use the default AWS provider chain, and you need to configureroleArnandroleSessionNmaeinawsCredentialPluginParam. For more information, see AWS documentation

































