From 75728edecdf0a1ac3cc07777674a2f088b9e3075 Mon Sep 17 00:00:00 2001 From: bhashinee Date: Thu, 18 Apr 2024 14:21:38 +0530 Subject: [PATCH 01/14] Update the docs --- README.md | 4 ++-- ballerina/Module.md | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3772c14..9579dab 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Once you log in to your AWS account, you need to create a user group and a user Create IAM user -* Click through the permissions setup, and add the user to the user group we previously created. +* Click through the permission setup, and add the user to the user group we previously created. Attach user group @@ -74,7 +74,7 @@ import ballerinax/aws.dynamodbstreams; ``` ### Step 2: Instantiate a new connector -Create a `dynamodbstreams:ConnectionConfig` with the obtained access key ID and secret access key to initialize the connector with it. +Instantiate a new `Client` using the access key ID, secret access key and the region. ```ballerina dynamodbstreams:Client dynamoDbStreams = check new({ awsCredentials: { diff --git a/ballerina/Module.md b/ballerina/Module.md index f6d6aef..eb9b7e4 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -3,12 +3,6 @@ The Ballerina AWS DynamoDB streams connector provides the capability to programa This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html). -## Overview - -The connector provides the capability to programatically handle AWS DynamoDB Streams related operations. - -This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html). - ## Setup guide ### Step 1: Create an AWS account @@ -37,7 +31,7 @@ Once you log in to your AWS account, you need to create a user group and a user Create IAM user -* Click through the permissions setup, and add the user to the user group we previously created. +* Click through the permission setup, and add the user to the user group we previously created. Attach user group @@ -64,13 +58,15 @@ Once you log in to your AWS account, you need to create a user group and a user To use the `dynamodbstreams` connector in your Ballerina application, modify the `.bal` file as follows: ### Step 1: Import the connector + Import the `ballerinax/aws.dynamodbstreams` package into your Ballerina project. ```ballerina import ballerinax/aws.dynamodbstreams; ``` ### Step 2: Instantiate a new connector -Create a `dynamodbstreams:ConnectionConfig` with the obtained access key ID and secret access key to initialize the connector with it. + +Instantiate a new `Client` using the access key ID, secret access key and the region. ```ballerina dynamodbstreams:Client dynamoDbStreams = check new({ awsCredentials: { @@ -82,6 +78,7 @@ dynamodbstreams:Client dynamoDbStreams = check new({ ``` ### Step 3: Invoke the connector operation + Now, utilize the available connector operations. ```ballerina From e2a1fe56b851a4025ed2b90031dfe121cd51cba2 Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Thu, 18 Apr 2024 14:25:21 +0530 Subject: [PATCH 02/14] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9579dab..0399557 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,14 @@ ## Overview -The connector provides the capability to programatically handle AWS DynamoDB Streams related operations. +The connector provides the capability to programmatically handle AWS DynamoDB Streams-related operations. This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html). ## Setup guide ### Step 1: Create an AWS account + * If you don't already have an AWS account, you need to create one. Go to the [AWS Management Console](https://console.aws.amazon.com/console/home), click on "Create a new AWS Account," and follow the instructions. ### Step 2: Get the access key ID and the secret access key From d33abf8c5c8a9a81342546e7ff7da5ceba470269 Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Thu, 18 Apr 2024 14:25:57 +0530 Subject: [PATCH 03/14] Update Module.md --- ballerina/Module.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ballerina/Module.md b/ballerina/Module.md index eb9b7e4..d7b74cb 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -1,5 +1,5 @@ ## Overview -The Ballerina AWS DynamoDB streams connector provides the capability to programatically handle [AWS DynamoDB streams](https://aws.amazon.com/dynamodb/) related operations. +The Ballerina AWS DynamoDB streams connector provides the capability to programmatically handle [AWS DynamoDB streams](https://aws.amazon.com/dynamodb/) related operations. This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html). @@ -13,6 +13,7 @@ This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon Once you log in to your AWS account, you need to create a user group and a user with the necessary permissions to access DynamoDB. To do this, follow the steps below: 1. Create an AWS user group + * Navigate to the Identity and Access Management (IAM) service. Click on "Groups" and then "Create New Group." Create user group From b39012a7b888acfa7e2376dc162312f3cfc2329f Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Thu, 18 Apr 2024 14:57:45 +0530 Subject: [PATCH 04/14] Add new lines --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0399557..8c9f1ac 100644 --- a/README.md +++ b/README.md @@ -69,12 +69,14 @@ Once you log in to your AWS account, you need to create a user group and a user To use the `dynamodbstreams` connector in your Ballerina application, modify the `.bal` file as follows: ### Step 1: Import the connector + Import the `ballerinax/aws.dynamodbstreams` package into your Ballerina project. ```ballerina import ballerinax/aws.dynamodbstreams; ``` ### Step 2: Instantiate a new connector + Instantiate a new `Client` using the access key ID, secret access key and the region. ```ballerina dynamodbstreams:Client dynamoDbStreams = check new({ @@ -87,6 +89,7 @@ dynamodbstreams:Client dynamoDbStreams = check new({ ``` ### Step 3: Invoke the connector operation + Now, utilize the available connector operations. ```ballerina From a8f18f32875ce7ecc504171e53ddbcd43d84a8ff Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Thu, 18 Apr 2024 14:58:22 +0530 Subject: [PATCH 05/14] Add new lines --- ballerina/Module.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ballerina/Module.md b/ballerina/Module.md index d7b74cb..b84770c 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -6,6 +6,7 @@ This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon ## Setup guide ### Step 1: Create an AWS account + * If you don't already have an AWS account, you need to create one. Go to the [AWS Management Console](https://console.aws.amazon.com/console/home), click on "Create a new AWS Account," and follow the instructions. ### Step 2: Get the access key ID and the secret access key From c135deb7ac1ccfeee18d69de28b2d15f22383336 Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Thu, 18 Apr 2024 15:02:46 +0530 Subject: [PATCH 06/14] Add new lines --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8c9f1ac..9f0e5b1 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon Once you log in to your AWS account, you need to create a user group and a user with the necessary permissions to access DynamoDB. To do this, follow the steps below: 1. Create an AWS user group + * Navigate to the Identity and Access Management (IAM) service. Click on "Groups" and then "Create New Group." Create user group From c57ca5bc067552aff33b69f53b8f17de34222a1e Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 22 Apr 2024 10:22:40 +0530 Subject: [PATCH 07/14] Update the set up images location --- README.md | 31 +++--- ballerina/Module.md | 20 ++-- ballerina/Package.md | 96 +++++++++++------- .../resources/create-access-key.png | Bin .../resources/create-group-policies.png | Bin docs/{ => setup}/resources/create-group.png | Bin .../resources/create-user-iam-user.png | Bin .../resources/create-user-review.png | Bin .../resources/create-user-set-permission.png | Bin docs/{ => setup}/resources/create-user.png | Bin .../resources/download-access-key.png | Bin docs/{ => setup}/resources/view-user.png | Bin 12 files changed, 89 insertions(+), 58 deletions(-) rename docs/{ => setup}/resources/create-access-key.png (100%) rename docs/{ => setup}/resources/create-group-policies.png (100%) rename docs/{ => setup}/resources/create-group.png (100%) rename docs/{ => setup}/resources/create-user-iam-user.png (100%) rename docs/{ => setup}/resources/create-user-review.png (100%) rename docs/{ => setup}/resources/create-user-set-permission.png (100%) rename docs/{ => setup}/resources/create-user.png (100%) rename docs/{ => setup}/resources/download-access-key.png (100%) rename docs/{ => setup}/resources/view-user.png (100%) diff --git a/README.md b/README.md index 9579dab..eaff832 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon ## Setup guide ### Step 1: Create an AWS account + * If you don't already have an AWS account, you need to create one. Go to the [AWS Management Console](https://console.aws.amazon.com/console/home), click on "Create a new AWS Account," and follow the instructions. ### Step 2: Get the access key ID and the secret access key @@ -23,69 +24,73 @@ This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon Once you log in to your AWS account, you need to create a user group and a user with the necessary permissions to access DynamoDB. To do this, follow the steps below: 1. Create an AWS user group + * Navigate to the Identity and Access Management (IAM) service. Click on "Groups" and then "Create New Group." - Create user group + Create user group * Enter a group name and attach the necessary policies to the group. For example, you can attach the "AmazonDynamoDBFullAccess" policy to provide full access to DynamoDB. - Attach policy + Attach policy 2. Create an IAM user * In the IAM console, navigate to "Users" and click on "Add user." - Add user + Add user * Enter a username, tick the "Provide user access to the AWS Management Console - optional" checkbox, and click "I want to create an IAM user". This will enable programmatic access through access keys. - Create IAM user + Create IAM user * Click through the permission setup, and add the user to the user group we previously created. - Attach user group + Attach user group * Review the details and click "Create user." - Review user + Review user 3. Generate access key ID and secret access key * Once the user is created, you will see a success message. Navigate to the "Users" tab, and select the user you created. - View User + View User * Click on the "Create access key" button to generate the access key ID and secret access key. - Create access key + Create access key * Follow the steps and download the CSV file containing the credentials. - Download credentials + Download credentials ## Quickstart To use the `dynamodbstreams` connector in your Ballerina application, modify the `.bal` file as follows: ### Step 1: Import the connector + Import the `ballerinax/aws.dynamodbstreams` package into your Ballerina project. ```ballerina import ballerinax/aws.dynamodbstreams; ``` ### Step 2: Instantiate a new connector + Instantiate a new `Client` using the access key ID, secret access key and the region. ```ballerina dynamodbstreams:Client dynamoDbStreams = check new({ awsCredentials: { - accessKeyId: "ACCESS_KEY_ID", - secretAccessKey: "SECRET_ACCESS_KEY" + accessKeyId, + secretAccessKey }, - region: "REGION" + region }); ``` ### Step 3: Invoke the connector operation + Now, utilize the available connector operations. ```ballerina @@ -112,8 +117,6 @@ The `dynamodbstreams` connector provides practical examples illustrating usage i 1. [Real-time order processing](https://github.com/ballerina-platform/module-ballerinax-aws.dynamodbstreams/tree/master/examples/order-management) This example shows how to use DynamoDB Streams API to implement a real-time order processing system. -For comprehensive information about the connector's functionality, configuration, and usage in Ballerina programs, refer to the `dynamodbstreams` connector's reference guide in [Ballerina Central](https://central.ballerina.io/ballerinax/aws.dynamodbstreams/latest). - ## Issues and projects The **Issues** and **Projects** tabs are disabled for this repository as this is part of the Ballerina library. To report bugs, request new features, start new discussions, view project boards, etc., visit the Ballerina library [parent repository](https://github.com/ballerina-platform/ballerina-library). diff --git a/ballerina/Module.md b/ballerina/Module.md index eb9b7e4..d106e5c 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -6,6 +6,7 @@ This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon ## Setup guide ### Step 1: Create an AWS account + * If you don't already have an AWS account, you need to create one. Go to the [AWS Management Console](https://console.aws.amazon.com/console/home), click on "Create a new AWS Account," and follow the instructions. ### Step 2: Get the access key ID and the secret access key @@ -13,45 +14,46 @@ This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon Once you log in to your AWS account, you need to create a user group and a user with the necessary permissions to access DynamoDB. To do this, follow the steps below: 1. Create an AWS user group + * Navigate to the Identity and Access Management (IAM) service. Click on "Groups" and then "Create New Group." - Create user group + Create user group * Enter a group name and attach the necessary policies to the group. For example, you can attach the "AmazonDynamoDBFullAccess" policy to provide full access to DynamoDB. - Attach policy + Attach policy 2. Create an IAM user * In the IAM console, navigate to "Users" and click on "Add user." - Add user + Add user * Enter a username, tick the "Provide user access to the AWS Management Console - optional" checkbox, and click "I want to create an IAM user". This will enable programmatic access through access keys. - Create IAM user + Create IAM user * Click through the permission setup, and add the user to the user group we previously created. - Attach user group + Attach user group * Review the details and click "Create user." - Review user + Review user 3. Generate access key ID and secret access key * Once the user is created, you will see a success message. Navigate to the "Users" tab, and select the user you created. - View User + View User * Click on the "Create access key" button to generate the access key ID and secret access key. - Create access key + Create access key * Follow the steps and download the CSV file containing the credentials. - Download credentials + Download credentials ## Quickstart diff --git a/ballerina/Package.md b/ballerina/Package.md index 2aec907..349127a 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -1,83 +1,109 @@ -## Package overview +## Overview -The `ballerinax/aws.dynamodbstreams` is a [Ballerina](https://ballerina.io/) connector for AWS DynamoDB. It is comprised of the following capabilities. -* Perform AWS DynamoDB Streams related operations programmatically. The `ballerinax/aws.dynamodbstreams` module provides this capability. +The Ballerina AWS DynamoDB streams connector provides the capability to programatically handle [AWS DynamoDB streams](https://aws.amazon.com/dynamodb/) related operations. -## Set up DynamoDB credentials +This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html). -To invoke the DynamoDB REST API, you need AWS credentials. Below is a step-by-step guide on how to obtain these credentials: +## Setup guide -1. Create an AWS Account: -* If you don't already have an AWS account, you need to create one. Go to the AWS Management Console, click on "Create an AWS Account," and follow the instructions. +### Step 1: Create an AWS account -2. Access the AWS Identity and Access Management (IAM) Console: +* If you don't already have an AWS account, you need to create one. Go to the [AWS Management Console](https://console.aws.amazon.com/console/home), click on "Create a new AWS Account," and follow the instructions. -* Once logged into the [AWS Management Console](https://aws.amazon.com/), go to the IAM console by selecting "Services" and then choosing "IAM" under the "Security, Identity, & Compliance" section. +### Step 2: Get the access key ID and the secret access key -3. Create an IAM User: +Once you log in to your AWS account, you need to create a user group and a user with the necessary permissions to access DynamoDB. To do this, follow the steps below: + +1. Create an AWS user group + +* Navigate to the Identity and Access Management (IAM) service. Click on "Groups" and then "Create New Group." + + Create user group + +* Enter a group name and attach the necessary policies to the group. For example, you can attach the "AmazonDynamoDBFullAccess" policy to provide full access to DynamoDB. + + Attach policy + +2. Create an IAM user * In the IAM console, navigate to "Users" and click on "Add user." -* Enter a username, and under "Select AWS access type," choose "Programmatic access." -* Click through the permissions setup, attaching policies that grant access to DynamoDB if you have specific requirements. + + Add user + +* Enter a username, tick the "Provide user access to the AWS Management Console - optional" checkbox, and click "I want to create an IAM user". This will enable programmatic access through access keys. + + Create IAM user + +* Click through the permission setup, and add the user to the user group we previously created. + + Attach user group + * Review the details and click "Create user." -4. Access Key ID and Secret Access Key: + Review user -* Once the user is created, you will see a success message. Take note of the "Access key ID" and "Secret access key" displayed on the confirmation screen. These credentials are needed to authenticate your requests. +3. Generate access key ID and secret access key -5. Securely Store Credentials: +* Once the user is created, you will see a success message. Navigate to the "Users" tab, and select the user you created. -* Download the CSV file containing the credentials, or copy the "Access key ID" and "Secret access key" to a secure location. This information is sensitive and should be handled with care. + View User -6. Use the Credentials in Your Application: +* Click on the "Create access key" button to generate the access key ID and secret access key. -* In your application, use the obtained "Access key ID" and "Secret access key" to authenticate requests to the DynamoDB REST API. + Create access key -## Quickstart +* Follow the steps and download the CSV file containing the credentials. + + Download credentials -**Note**: Ensure you follow the [prerequisites](https://github.com/ballerina-platform/module-ballerinax-aws.dynamodbstreams#set-up-dynamodb-credentials) to get the credentials to be used. +## Quickstart To use the `dynamodbstreams` connector in your Ballerina application, modify the `.bal` file as follows: ### Step 1: Import the connector + Import the `ballerinax/aws.dynamodbstreams` package into your Ballerina project. ```ballerina import ballerinax/aws.dynamodbstreams; ``` ### Step 2: Instantiate a new connector -Create a `dynamodbstreams:ConnectionConfig` with the obtained access key id and secret access key to initialize the connector with it. + +Instantiate a new `Client` using the access key ID, secret access key and the region. ```ballerina -dynamodbstreams:ConnectionConfig amazonDynamodbConfig = { +dynamodbstreams:Client dynamoDbStreams = check new({ awsCredentials: { accessKeyId: "ACCESS_KEY_ID", secretAccessKey: "SECRET_ACCESS_KEY" }, region: "REGION" -}; - -dynamodbstreams:Client amazonDynamodbClient = check new(amazonDynamodbConfig); +}); ``` -### Step 3: Invoke connector operation -1. Now you can use the operations available within the connector. Note that they are in the form of remote operations. -Following is an example of how to describe a stream in DynamoDB streams using the connector. +### Step 3: Invoke the connector operation + +Now, utilize the available connector operations. ```ballerina public function main() returns error? { dynamodbstreams:DescribeStreamInput describeStreamInput = { streamArn: "arn:aws:dynamodb:us-east-1:134633749276:table/TestStreamTable/stream/2024-01-04T04:43:13.919" }; - dynamodbstreams:StreamDescription response = check dynamoDBStreamClient->describeStream(describeStreamInput); + dynamodbstreams:StreamDescription response = check dynamoDbStreams->describeStream(describeStreamInput); } ``` -2. Use `bal run` command to compile and run the Ballerina program. -## Report issues +### Step 4: Run the Ballerina application + +Use the following command to compile and run the Ballerina program. + +```bash +bal run +``` -To report bugs, request new features, start new discussions, view project boards, etc., go to the [Ballerina standard library parent repository](https://github.com/ballerina-platform/ballerina-standard-library). +## Examples -## Useful links +The `dynamodbstreams` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-aws.dynamodbstreams/tree/master/examples). -- Chat live with us via our [Discord server](https://discord.gg/ballerinalang). -- Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag. +1. [Real-time order processing](https://github.com/ballerina-platform/module-ballerinax-aws.dynamodbstreams/tree/master/examples/order-management) + This example shows how to use DynamoDB Streams API to implement a real-time order processing system. diff --git a/docs/resources/create-access-key.png b/docs/setup/resources/create-access-key.png similarity index 100% rename from docs/resources/create-access-key.png rename to docs/setup/resources/create-access-key.png diff --git a/docs/resources/create-group-policies.png b/docs/setup/resources/create-group-policies.png similarity index 100% rename from docs/resources/create-group-policies.png rename to docs/setup/resources/create-group-policies.png diff --git a/docs/resources/create-group.png b/docs/setup/resources/create-group.png similarity index 100% rename from docs/resources/create-group.png rename to docs/setup/resources/create-group.png diff --git a/docs/resources/create-user-iam-user.png b/docs/setup/resources/create-user-iam-user.png similarity index 100% rename from docs/resources/create-user-iam-user.png rename to docs/setup/resources/create-user-iam-user.png diff --git a/docs/resources/create-user-review.png b/docs/setup/resources/create-user-review.png similarity index 100% rename from docs/resources/create-user-review.png rename to docs/setup/resources/create-user-review.png diff --git a/docs/resources/create-user-set-permission.png b/docs/setup/resources/create-user-set-permission.png similarity index 100% rename from docs/resources/create-user-set-permission.png rename to docs/setup/resources/create-user-set-permission.png diff --git a/docs/resources/create-user.png b/docs/setup/resources/create-user.png similarity index 100% rename from docs/resources/create-user.png rename to docs/setup/resources/create-user.png diff --git a/docs/resources/download-access-key.png b/docs/setup/resources/download-access-key.png similarity index 100% rename from docs/resources/download-access-key.png rename to docs/setup/resources/download-access-key.png diff --git a/docs/resources/view-user.png b/docs/setup/resources/view-user.png similarity index 100% rename from docs/resources/view-user.png rename to docs/setup/resources/view-user.png From 1ae01e696c2af6c343b10568aee9ed30f64e4396 Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Mon, 22 Apr 2024 15:01:18 +0530 Subject: [PATCH 08/14] Apply suggestions from code review Co-authored-by: Nuvindu Nirmana <63797478+Nuvindu@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d0217fe..894f0e6 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,9 @@ Once you log in to your AWS account, you need to create a user group and a user To use the `dynamodbstreams` connector in your Ballerina application, modify the `.bal` file as follows: -### Step 1: Import the connector +### Step 1: Import the module -Import the `ballerinax/aws.dynamodbstreams` package into your Ballerina project. +Import the `ballerinax/aws.dynamodbstreams` module into your Ballerina project. ```ballerina import ballerinax/aws.dynamodbstreams; ``` From 2e66bc8408d494f7663a75dde7421836aed902fe Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Mon, 22 Apr 2024 15:06:21 +0530 Subject: [PATCH 09/14] Address code review suggestions --- ballerina/Module.md | 5 ++--- ballerina/Package.md | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ballerina/Module.md b/ballerina/Module.md index 267e5e8..b17c973 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -59,12 +59,11 @@ Once you log in to your AWS account, you need to create a user group and a user To use the `dynamodbstreams` connector in your Ballerina application, modify the `.bal` file as follows: -### Step 1: Import the connector +### Step 1: Import the module -Import the `ballerinax/aws.dynamodbstreams` package into your Ballerina project. +Import the `ballerinax/aws.dynamodbstreams` module into your Ballerina project. ```ballerina import ballerinax/aws.dynamodbstreams; -``` ### Step 2: Instantiate a new connector diff --git a/ballerina/Package.md b/ballerina/Package.md index 349127a..b7bba06 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -1,4 +1,4 @@ -## Overview +## Package overview The Ballerina AWS DynamoDB streams connector provides the capability to programatically handle [AWS DynamoDB streams](https://aws.amazon.com/dynamodb/) related operations. @@ -60,12 +60,11 @@ Once you log in to your AWS account, you need to create a user group and a user To use the `dynamodbstreams` connector in your Ballerina application, modify the `.bal` file as follows: -### Step 1: Import the connector +### Step 1: Import the module -Import the `ballerinax/aws.dynamodbstreams` package into your Ballerina project. +Import the `ballerinax/aws.dynamodbstreams` module into your Ballerina project. ```ballerina import ballerinax/aws.dynamodbstreams; -``` ### Step 2: Instantiate a new connector From c3741b77bcfa787a9fc61c298a32fdcec433bfab Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Mon, 22 Apr 2024 15:07:43 +0530 Subject: [PATCH 10/14] Update the example README --- examples/order-management/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/order-management/README.md b/examples/order-management/README.md index 8f06422..291e8e1 100644 --- a/examples/order-management/README.md +++ b/examples/order-management/README.md @@ -1,4 +1,4 @@ -# Real-time Order Processing +# Real-time order processing ## Overview @@ -15,7 +15,7 @@ Consider a scenario you want to do real-time order processing. You can simply do In this example, we'll use a basic long-polling approach to continuously check the DynamoDB Stream for new records. You can use the `getRecords` API for this. -## Run the Example +## Run the example First, clone this repository, and then run the following commands to run this example in your local machine. From cbb2b8d3c8e9c63a5122ea037e2a2877255e24fd Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Mon, 22 Apr 2024 15:21:58 +0530 Subject: [PATCH 11/14] Add intro to Module.md --- ballerina/Module.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ballerina/Module.md b/ballerina/Module.md index b17c973..ac202fa 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -1,4 +1,6 @@ ## Overview + +[Amazon DynamoDB](https://aws.amazon.com/dynamodb/) is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-region replication, in-memory caching, and data export tools. The Ballerina AWS DynamoDB streams connector provides the capability to programmatically handle [AWS DynamoDB streams](https://aws.amazon.com/dynamodb/) related operations. This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html). From ef20915eba93a302fad77beffe811edc6e601472 Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Mon, 22 Apr 2024 15:22:26 +0530 Subject: [PATCH 12/14] Add intro to Package.md --- ballerina/Package.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ballerina/Package.md b/ballerina/Package.md index b7bba06..e5c992f 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -1,5 +1,6 @@ ## Package overview +[Amazon DynamoDB](https://aws.amazon.com/dynamodb/) is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-region replication, in-memory caching, and data export tools. The Ballerina AWS DynamoDB streams connector provides the capability to programatically handle [AWS DynamoDB streams](https://aws.amazon.com/dynamodb/) related operations. This module supports [Amazon DynamoDB REST API 20120810](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html). From 18b7e07c6becfd9e4a3f1092922e4bd934031e3a Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Mon, 22 Apr 2024 15:24:56 +0530 Subject: [PATCH 13/14] Update the sample code --- ballerina/Module.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ballerina/Module.md b/ballerina/Module.md index ac202fa..a4a6d18 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -73,10 +73,10 @@ Instantiate a new `Client` using the access key ID, secret access key and the re ```ballerina dynamodbstreams:Client dynamoDbStreams = check new({ awsCredentials: { - accessKeyId: "ACCESS_KEY_ID", - secretAccessKey: "SECRET_ACCESS_KEY" + accessKeyId, + secretAccessKey }, - region: "REGION" + region }); ``` From 54e76a5ee8761a5e66b13fec446127a7b7e1bd7c Mon Sep 17 00:00:00 2001 From: Bhashinee Date: Mon, 22 Apr 2024 15:25:27 +0530 Subject: [PATCH 14/14] Update the code samples --- ballerina/Package.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ballerina/Package.md b/ballerina/Package.md index e5c992f..ec4362d 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -73,10 +73,10 @@ Instantiate a new `Client` using the access key ID, secret access key and the re ```ballerina dynamodbstreams:Client dynamoDbStreams = check new({ awsCredentials: { - accessKeyId: "ACCESS_KEY_ID", - secretAccessKey: "SECRET_ACCESS_KEY" + accessKeyId, + secretAccessKey }, - region: "REGION" + region }); ```