Skip to content

Commit

Permalink
add aurora-list just recipe to show reader/writer endpoints
Browse files Browse the repository at this point in the history
shieldo committed Oct 31, 2023
1 parent d2d7cc0 commit a76dcfd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
@@ -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 <endpoint>' 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 <endpoint>' 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

0 comments on commit a76dcfd

Please sign in to comment.