π AWS DMS Replication Instance is publicly accessible π’
- Contextual name: π Replication Instance is publicly accessible π’
- ID:
/ce/ca/aws/dms/replication-instance-publicly-accessible
- Located in: π AWS DMS
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- AWS Security Hub
- [[DMS.1] Database Migration Service replication instances should not be public]([DMS.1] Database Migration Service replication instances should not be public (https://docs.aws.amazon.com/securityhub/latest/userguide/dms-controls.html#dms-1)]
- Internal
dec-x-e02b5fdd
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-e02b5fdd | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
This policy checks that AWS Database Migration Service (DMS) Replication Instances are not public.
A DMS replication instance performs data migration between source and target databases.
Rationaleβ
Public accessibility increases the attack surface and the likelihood of bruteβforce or other intrusion attempts. Additionally, sensitive migration data could be intercepted if transmitted over the open internet.
To mitigate these risks, configure replication instances within private subnets and establish required connections using secure, private networking methods (e.g., VPC Peering, AWS Direct Connect, or VPN).
Auditβ
This policy marks an AWS DMS Replication Instance as
INCOMPLIANT
if thePublicly Accessible
checkbox is set to true.
Remediationβ
Remediationβ
You cannot modify the
PubliclyAccessible
attribute of an existing DMS replication instance inβplace, you must delete the incompliant instance and recreate it with the correct setting.From Command Lineβ
Export the existing instance configurationβ
aws dms describe-replication-instances \
--filters Name=replication-instance-arn,Values={{current-instance-arn}} \
--output json > describe.jsonGenerate a CLI payload with
PubliclyAccessible: false
βUse
jq
to extract all mutable parameters, override the publicβaccess flag, and produce a JSON file for creation:jq '
.ReplicationInstances[0]
| {
ReplicationInstanceIdentifier,
ReplicationInstanceClass,
PubliclyAccessible: false, # enforce private-only access
AllocatedStorage,
EngineVersion,
ReplicationSubnetGroupIdentifier,
VpcSecurityGroupIds,
MultiAZ,
AutoMinorVersionUpgrade,
PreferredMaintenanceWindow
}
' describe.json > create-instance.jsonAlternatively, generate a CloudFormation templateβ
... see more