Skip to main content
The db_instance_automated_backups_replication submodule enables cross-region replication of automated backups for an RDS DB instance. It creates an aws_db_instance_automated_backups_replication resource in the destination region that continuously replicates backups from the source region. This is distinct from a cross-region read replica: automated backups replication does not create a live standby instance — it copies backup data to the destination region so that you can restore a DB instance there in a disaster recovery scenario.

Source

Usage

This submodule must be deployed in the destination region by configuring an alternate AWS provider:
main.tf
The source RDS instance must have backup_retention_period set to 1 or greater. Automated backups replication cannot be enabled on an instance with backups disabled.

Input variables

string
The ARN of the source DB instance whose automated backups will be replicated to this region.Default: null
string
The ARN of the KMS encryption key in the destination AWS region used to encrypt the replicated backups. If not specified, the default AWS-managed KMS key for RDS is used.Default: null
number
The number of days to retain the replicated automated backups in the destination region. Must be between 1 and 35.Default: 7
string
A pre-signed URL containing a Signature Version 4 signed request for the StartDBInstanceAutomatedBackupsReplication action in the source region. Required only when replicating to a region that requires an explicit pre-signed URL.Default: null
bool
Whether to create the automated backups replication resource. Set to false to skip creation.Default: true
string
Region where this resource will be managed. Defaults to the region set in the provider configuration.Default: null

Complete example

The examples/complete-postgres/ and examples/cross-region-replica-postgres/ examples show this submodule used alongside a KMS module:
main.tf

Relationship to cross-region read replicas

See the read replicas guide for documentation on cross-region live replicas.