Skip to main content
Aurora DSQL is Amazon’s distributed, serverless SQL database. It is not an Aurora RDS cluster variant — it is a separate service built on a different distributed architecture that provides virtually unlimited scalability with active-active multi-region support and strong consistency.
Aurora DSQL is provisioned through the dedicated modules/dsql submodule, not through the main terraform-aws-modules/rds-aurora/aws module. Reference the submodule source as terraform-aws-modules/rds-aurora/aws//modules/dsql when using the Terraform Registry, or ../../modules/dsql from within the repository.
Key characteristics of Aurora DSQL:
  • Serverless — no instances to provision or manage; you pay per operation
  • Distributed — data is automatically sharded and replicated
  • Multi-region active-active — peer clusters across regions with a witness region for quorum
  • PostgreSQL-compatible — uses standard PostgreSQL wire protocol

Examples

A minimal DSQL cluster in a single region requires only a name. Deletion protection is disabled here for demonstration.
module "dsql_single_region" {
  source = "terraform-aws-modules/rds-aurora/aws//modules/dsql"

  name = "my-dsql-cluster"

  # Disable for non-production environments
  deletion_protection_enabled = false

  tags = {
    Environment = "dev"
    Terraform   = "true"
  }
}

Variables reference

Core variables

VariableTypeDefaultDescription
createbooltrueToggle creation of all resources in the module
namestring""Name applied to the cluster and used as the Name tag
regionstringnullAWS region override. Defaults to the provider’s configured region
tagsmap(string){}Tags to apply to all resources

Cluster variables

VariableTypeDefaultDescription
deletion_protection_enabledboolnullPrevent the cluster from being deleted via the AWS console or API
kms_encryption_keystringnullARN of a customer-managed KMS key, or "AWS_OWNED_KMS_KEY" to use the default
force_destroyboolnullDelete the cluster even if deletion_protection_enabled is true

Multi-region / peering variables

VariableTypeDefaultDescription
create_cluster_peeringboolfalseCreate the aws_dsql_cluster_peering resource
clusterslist(string)nullARNs of other DSQL clusters to peer with
witness_regionstringnullThe AWS region used as the quorum witness. Setting this makes the cluster multi-region
timeoutsobject({ create })nullTimeout override for the cluster peering create operation

Outputs reference

OutputDescription
identifierThe cluster identifier assigned by AWS
arnThe ARN of the DSQL cluster
vpc_endpoint_service_nameVPC endpoint service name for private connectivity
encryption_detailsEncryption configuration details for the cluster
multi_region_propertiesMulti-region configuration details (populated for multi-region clusters)

Using outputs

output "dsql_cluster_1_arn" {
  description = "ARN of the cluster"
  value       = module.dsql_cluster_1.arn
}

output "dsql_cluster_1_identifier" {
  description = "Cluster identifier"
  value       = module.dsql_cluster_1.identifier
}

output "dsql_cluster_1_vpc_endpoint_service_name" {
  description = "The DSQL cluster's VPC endpoint service name"
  value       = module.dsql_cluster_1.vpc_endpoint_service_name
}

Build docs developers (and LLMs) love