Description
MySQL, MariaDB and Aurora MySQL default to port 3306. PostgreSQL and Aurora PostgreSQL default to 5432. Aurora sets port on the cluster for all its instances.
Potential impact
A broad security group lets unnecessary clients attempt connections. Changing an Aurora cluster’s port immediately reboots every instance in the cluster.
Remediation
Review subnet routes, allow only required clients through the security group, and use authentication, least-privilege database permissions and transport encryption. If you need a different port, choose a supported value and coordinate the restart with updates to applications, firewalls and monitoring.
Examples
The examples change the Aurora MySQL cluster port from 3306 to 3307. Provide administrator credentials securely and supply the network, security groups and cluster instances separately.
Before
- name: Aurora 클러스터 포트 설정
amazon.aws.rds_cluster:
engine: aurora-mysql
password: "{{ password }}"
username: "{{ username }}"
cluster_id: ansible-test-cluster
backup_retention_period: 7
port: 3306
After
- name: Aurora 클러스터 포트 설정
amazon.aws.rds_cluster:
engine: aurora-mysql
password: "{{ password }}"
username: "{{ username }}"
cluster_id: ansible-test-cluster
backup_retention_period: 7
port: 3307