From a76dcfd63c2677c2db04971bc09440e74d5c07be Mon Sep 17 00:00:00 2001 From: Douglas Greenshields Date: Tue, 31 Oct 2023 16:07:37 +0000 Subject: [PATCH] add aurora-list just recipe to show reader/writer endpoints --- justfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index ef75237..ffe246f 100644 --- a/justfile +++ b/justfile @@ -134,13 +134,20 @@ _ensure_jq: fi fi -# list available rds hosts +# list available rds hosts (instances) rds-list: _ensure_aws_profile #!/usr/bin/env bash aws-vault exec $AWS_PROFILE -- aws rds describe-db-instances --query 'DBInstances[*].Endpoint.Address' --output table echo "run 'just rds-connect ' to connect to the rds instance" +# list available rds aurora endpoints (shown with WRITER/READER type) +aurora-list: _ensure_aws_profile + #!/usr/bin/env bash + + aws-vault exec $AWS_PROFILE -- aws rds describe-db-cluster-endpoints --query 'DBClusterEndpoints[*].[EndpointType,Endpoint]' --output table + echo "run 'just rds-connect ' to connect to the rds instance" + # Creates connection to RDS instance. requires bastion host 'bastion-host' to be running in currenct account. Run 'just rds-list' to get available endpoint addresses rds-connect rds_endpoint local_port="5555": _ensure_aws_profile #!/usr/bin/env bash