rds ssh
slackapp-stg-mysql-one.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com
mysql -u 계정이름 -p -h 엔드포인트
RDS DB 리스트업
aws rds describe-db-instances
$ aws rds describe-db-instances \
> --query "*[].[DBInstanceIdentifier,Endpoint.Address,Endpoint.Port,MasterUsername]"
[
[
"slackapp-stg-mysql-one",
"slackapp-stg-mysql-one.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
3306,
"slackapp"
],
[
"slackapp-stg-mysql-three",
"slackapp-stg-mysql-three.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
3306,
"slackapp"
],
[
"slackapp-stg-mysql-two",
"slackapp-stg-mysql-two.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
3306,
"slackapp"
],
[
"stg-sign-bo-postgres-instance-1",
"stg-sign-bo-postgres-instance-1.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
5432,
"postgres"
],
[
"stg-sign-bo-postgres-instance-1-ap-northeast-2a",
"stg-sign-bo-postgres-instance-1-ap-northeast-2a.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
5432,
"postgres"
],
[
"stg-sign-postgres-instance-1",
"stg-sign-postgres-instance-1.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
5432,
"postgres"
],
[
"stg-sign-postgres-instance-1-ap-northeast-2a",
"stg-sign-postgres-instance-1-ap-northeast-2a.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
5432,
"postgres"
],
[
"stg-sign-rabbit-postgres-instance-1",
"stg-sign-rabbit-postgres-instance-1.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
5432,
"postgres"
],
[
"stg-sign-rabbit-postgres-instance-1-ap-northeast-2a",
"stg-sign-rabbit-postgres-instance-1-ap-northeast-2a.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com",
5432,
"postgres"
]
]
aws ssm start-session --target "slackapp-stg-mysql-two.c1x2zusz8eyr.ap-northeast-2.rds.amazonaws.com"