Resource: aws_dynamodb_table_export

Terraform resource for managing an AWS DynamoDB Table Export. Terraform will wait until the Table export reaches a status of COMPLETED or FAILED.

See the AWS Documentation for more information on how this process works.

Example Usage

Basic Usage

resource "aws_s3_bucket" "example" {
  bucket_prefix = "example"
  force_destroy = true
}

resource "aws_dynamodb_table" "example" {
  name         = "example-table-1"
  billing_mode = "PAY_PER_REQUEST"
  hash_key     = "user_id"
  attribute {
    name = "user_id"
    type = "S"
  }

  point_in_time_recovery {
    enabled = true
  }
}

resource "aws_dynamodb_table_export" "example" {
  table_arn = aws_dynamodb_table.example.arn
  s3_bucket = aws_s3_bucket.example.id
}

Example with export time

resource "aws_dynamodb_table_export" "example" {
  export_time = "2023-04-02T11:30:13+01:00"
  s3_bucket   = aws_s3_bucket.example.id
  table_arn   = aws_dynamodb_table.example.arn
}

Argument Reference

The following arguments are required:

The following arguments are optional:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import DynamoDB table exports using the arn. For example:

import {
  to = aws_dynamodb_table_export.example
  id = "arn:aws:dynamodb:us-west-2:12345678911:table/my-table-1/export/01580735656614-2c2f422e"
}

Using terraform import, import DynamoDB table exports using the arn. For example:

% terraform import aws_dynamodb_table_export.example arn:aws:dynamodb:us-west-2:12345678911:table/my-table-1/export/01580735656614-2c2f422e