AWS DynamoDB Kinesis Streaming Destination

This page shows how to write Terraform and CloudFormation for DynamoDB Kinesis Streaming Destination and write them securely.

aws_dynamodb_kinesis_streaming_destination (Terraform)

The Kinesis Streaming Destination in DynamoDB can be configured in Terraform with the resource name aws_dynamodb_kinesis_streaming_destination. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

dynamodb.tf#L37
resource "aws_dynamodb_kinesis_streaming_destination" "equity_price" {
  stream_arn = aws_kinesis_stream.equity_price.arn
  table_name = aws_dynamodb_table.equity_price.name
}

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

The following arguments are supported:

  • stream_arn - (Required) The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
  • table_name - (Required) The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.

In addition to all arguments above, the following attributes are exported:

  • id - The table_name and stream_arn separated by a comma (,).

Explanation in Terraform Registry

Enables a Kinesis streaming destination for data replication of a DynamoDB table.

Tips: Best Practices for The Other AWS DynamoDB Resources

In addition to the aws_dynamodb_table, AWS DynamoDB has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.

risk-label

aws_dynamodb_table

Ensure to enable point-in-time recovery of DynamoDB table

It is better to enable point-in-time recovery of DynamoDB table. It may help you restore data that is modified or deleted maliciously or accidentally.

Review your AWS DynamoDB settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

AWS::DynamoDB::Table KinesisStreamSpecification (CloudFormation)

The Table KinesisStreamSpecification in DynamoDB can be configured in CloudFormation with the resource name AWS::DynamoDB::Table KinesisStreamSpecification. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

StreamArn The ARN for a specific Kinesis data stream.
Length Constraints: Minimum length of 37. Maximum length of 1024.
Required: Yes
Type: String
Minimum: 37
Maximum: 1024
Update requires: No interruption

Explanation in CloudFormation Registry

The Kinesis Data Streams configuration for the specified table.

Frequently asked questions

What is AWS DynamoDB Kinesis Streaming Destination?

AWS DynamoDB Kinesis Streaming Destination is a resource for DynamoDB of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS DynamoDB Kinesis Streaming Destination?

For Terraform, the jonunger/roxberry source code example is useful. See the Terraform Example section for further details.