Table: aws_dms_replication_instance - Query AWS Database Migration Service Replication Instances using SQL
The AWS Database Migration Service Replication Instances are fully managed, serverless instances that enable the migration of data from one type of database to another. They facilitate homogeneous or heterogeneous migrations and can handle continuous data replication with high availability and consolidated auditing. This service significantly simplifies the process of migrating existing data to AWS in a secure and efficient manner.
Table Usage Guide
The aws_dms_replication_instance
table in Steampipe provides you with information about each replication instance in an AWS Database Migration Service. This table allows you, as a database administrator, to query replication-specific details, including engine version, instance class, allocated storage, and associated metadata. You can utilize this table to gather insights on replication instances, such as their current state, multi-AZ mode, publicly accessible status, and more. The schema outlines the various attributes of the replication instance, including the replication instance ARN, replication instance identifier, availability zone, and associated tags for you.
Examples
Basic info
Explore which replication instances in your AWS Database Migration Service have public accessibility. This can help identify potential security risks and ensure that your data is properly protected.
select replication_instance_identifier, arn, engine_version, instance_create_time, kms_key_id, publicly_accessible, regionfrom aws_dms_replication_instance;
select replication_instance_identifier, arn, engine_version, instance_create_time, kms_key_id, publicly_accessible, regionfrom aws_dms_replication_instance;
List replication instances with auto minor version upgrades disabled
Determine the areas in which replication instances have automatic minor version upgrades turned off. This is useful for identifying potential security risks or outdated systems that may require manual updates.
select replication_instance_identifier, arn, engine_version, instance_create_time, auto_minor_version_upgrade, regionfrom aws_dms_replication_instancewhere not auto_minor_version_upgrade;
select replication_instance_identifier, arn, engine_version, instance_create_time, auto_minor_version_upgrade, regionfrom aws_dms_replication_instancewhere auto_minor_version_upgrade = 0;
List replication instances provisioned with undesired (for example, dms.r5.16xlarge and dms.r5.24xlarge are not desired) instance classes
Determine the areas in which replication instances are provisioned with instance classes that are not preferred, such as dms.r5.16xlarge and dms.r5.24xlarge. This enables you to identify and rectify instances that may not meet your specific requirements or standards.
select replication_instance_identifier, arn, engine_version, instance_create_time, replication_instance_class, regionfrom aws_dms_replication_instancewhere replication_instance_class not in ('dms.r5.16xlarge', 'dms.r5.24xlarge');
select replication_instance_identifier, arn, engine_version, instance_create_time, replication_instance_class, regionfrom aws_dms_replication_instancewhere replication_instance_class not in ('dms.r5.16xlarge', 'dms.r5.24xlarge');
List publicly accessible replication instances
Determine the areas in which replication instances are publicly accessible. This can help enhance security by identifying potential vulnerabilities in your system.
select replication_instance_identifier, arn, publicly_accessible, regionfrom aws_dms_replication_instancewhere publicly_accessible;
select replication_instance_identifier, arn, publicly_accessible, regionfrom aws_dms_replication_instancewhere publicly_accessible = 1;
List replication instances not using multi-AZ deployment configurations
Identify instances where the replication process is not utilizing multi-AZ deployment configurations. This query is beneficial for pinpointing potential areas of vulnerability in your system, as it highlights where redundancies may not be in place to prevent data loss in the event of an AZ outage.
select replication_instance_identifier, arn, publicly_accessible, multi_az, regionfrom aws_dms_replication_instancewhere not multi_az;
select replication_instance_identifier, arn, publicly_accessible, multi_az, regionfrom aws_dms_replication_instancewhere multi_az = 0;
Query examples
Control examples
- All Controls > DMS > DMS replication instances should have automatic minor version upgrade enabled
- AWS Foundational Security Best Practices > DMS > 1 AWS Database Migration Service replication instances should not be public
- AWS Foundational Security Best Practices > DMS > 6 DMS replication instances should have automatic minor version upgrade enabled
- DMS replication instances should not be publicly accessible
Schema for aws_dms_replication_instance
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
allocated_storage | bigint | The amount of storage (in gigabytes) that is allocated for the replication instance. | |
arn | text | = | The Amazon Resource Name (ARN) of the replication instance. |
auto_minor_version_upgrade | boolean | Boolean value indicating if minor version upgrades will be automatically applied to the instance. | |
availability_zone | text | The Availability Zone for the instance. | |
dns_name_servers | text | The DNS name servers supported for the replication instance to access your on-premise source or target database. | |
engine_version | text | = | The engine version number of the replication instance. |
free_until | timestamp with time zone | The expiration date of the free replication instance that is part of the Free DMS program. | |
instance_create_time | timestamp with time zone | The time the replication instance was created. | |
kms_key_id | text | An AWS KMS key identifier that is used to encrypt the data on the replication instance. | |
multi_az | boolean | Specifies whether the replication instance is a Multi-AZ deployment. | |
network_type | text | The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
pending_modified_values | jsonb | The pending modification values. | |
preferred_maintenance_window | text | The maintenance window times for the replication instance. | |
publicly_accessible | boolean | Specifies the accessibility options for the replication instance. | |
region | text | The AWS Region in which the resource is located. | |
replication_instance_class | text | = | The compute and memory capacity of the replication instance as defined for the specified replication instance class. |
replication_instance_identifier | text | = | The identifier of the replication instance. |
replication_instance_ipv6_addresses | jsonb | One or more IPv6 addresses for the replication instance. | |
replication_instance_private_ip_address | text | The private IP address of the replication instance. | |
replication_instance_private_ip_addresses | jsonb | One or more private IP addresses for the replication instance. | |
replication_instance_public_ip_address | text | The public IP address of the replication instance. | |
replication_instance_public_ip_addresses | jsonb | One or more public IP addresses for the replication instance. | |
replication_instance_status | text | The status of the replication instance. | |
replication_subnet_group | jsonb | The subnet group for the replication instance. | |
secondary_availability_zone | text | The Availability Zone of the standby replication instance in a Multi-AZ deployment. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | A list of tags currently associated with the replication instance. | |
title | text | Title of the resource. | |
vpc_security_groups | jsonb | The VPC security group for the instance. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_dms_replication_instance