--- title: "Create DynamoDB Integration" chapter: true weight: 202 --- ## CREATE A ROCKSET COLLECTION WITH DATA FROM DYNAMODB Rockset has a managed DynamoDB connector that bulk loads data into a Rockset collection. After the bulk load is complete, Rockset continuously syncs data whenever there is a change in the DynamoDB table through DynamoDB’s Stream API. As soon as there is a change in the **rockset_carpurchases** table, Rockset reflects that change within seconds. This is because Rockset leverages Change Data Capture (CDC) streams.
- Grab the empty S3 bucket name from the [S3 service](https://s3.console.aws.amazon.com/s3/home?region=us-east-1). It’ll have this naming pattern: rockset-data-integration-[AccountID].The **AccountID** will be a different value for every participant:
- When you create the AWS IAM Policy for DynamoDB, you must replace the S3 bucket name’s **AccountID** with the value you have.
- Overwrite and paste the below in the JSON tab (don’t forget to update the S3 bucket name in the JSON below):
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:GetShardIterator",
"dynamodb:Scan",
"dynamodb:DescribeStream",
"dynamodb:DescribeExport",
"dynamodb:GetRecords",
"dynamodb:DescribeTable",
"dynamodb:DescribeContinuousBackups",
"dynamodb:ExportTableToPointInTime",
"dynamodb:UpdateTable",
"dynamodb:UpdateContinuousBackups",
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:dynamodb:*:*:table/rockset_carpurchases",
"arn:aws:dynamodb:*:*:table/rockset_carpurchases/stream/*",
"arn:aws:dynamodb:*:*:table/rockset_carpurchases/export/*",
"arn:aws:s3:::bucketname",
"arn:aws:s3:::bucketname/*"
]
}
]
}
- It should look like this:
- When you’re done, go ahead and click on **Next: Tags**
- Immediately click on **Next: Review**.
- Give the policy name as **RocksetDynamoDBPolicy**. Then, click on **Create policy**:
- Switch to Rockset Console and grab the **Rockset Account ID** and **external ID** on the Rockset DynamoDB Integration page
- _Refer to the image below_:
- To find the policy we just created in step 4, go ahead and type the policy name in the search bar— **RocksetDynamoDBPolicy**. Be sure to click the policy so you can attach it to the role. Afterward, click on **Next**.
- Give the Role Name: **RocksetDynamoDBRole**. On the bottom right, click on **Create role**:
- Grab the Role ARN on the AWS side and paste on the Rockset Integration section:
- Navigate back to the Rockset DynamoDB Integration page and paste the ARN Role value under **Role ARN** and **Save Integration**:
- _Refer to the image below_:
- Towards the bottom at **Configure Ingest**, we have an opportunity to do query-based field mappings, also known as QBFMs. This is where we can massage the data as it’s being ingested into Rockset. QBFMs allow you to do SQL-based field mappings. This saves on storage and compute at query time (also known as run time). Click on **Configure SQL rollups and/or transformations**: