rds_ssm_connect 1.0.6 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -6
- package/connect.js +4 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,15 +20,40 @@ You can install this application globally using npm:
|
|
|
20
20
|
npm install -g rds_ssm_connect
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
2. Select the environment you want to use. The application will then execute a series of AWS commands within that environment.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Given your provided code, here's how to connect to the database:
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
rds_ssm_connect
|
|
29
|
-
```
|
|
27
|
+
## Connecting to the Database
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
1. Invoke `rds_ssm_connect` in your terminal:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
rds_ssm_connect
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The application will read your AWS configuration file and prompt you to select an environment.
|
|
36
|
+
|
|
37
|
+
2. Select the environment you want to connect to. The application will then execute a series of AWS commands within that environment. It will do the following:
|
|
38
|
+
|
|
39
|
+
- Extract the environments from the AWS configuration file
|
|
40
|
+
- Get the name of the parameter containing the RDS password
|
|
41
|
+
- Get the RDS credentials
|
|
42
|
+
- Display the connection credentials and the connection string
|
|
43
|
+
- Get the ID of the bastion instance
|
|
44
|
+
- Get the endpoint of the RDS cluster
|
|
45
|
+
- Start a port forwarding session to the RDS cluster
|
|
46
|
+
|
|
47
|
+
3. After you've selected an environment and the AWS commands have been executed, you will receive the connection information. Here is an example of the output:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Your connection string is: psql -h localhost -p <port> -U <username> -d oit
|
|
51
|
+
Use the password: <password>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
4. Use the provided connection string and password to connect to your database via a database administration tool of your choice, such as pgAdmin, DBeaver, or the `psql` command-line interface.
|
|
55
|
+
|
|
56
|
+
Please note: Make sure the chosen database administration tool is installed and configured on your local machine. The specific instructions for connecting to a database would vary based on the tool used.
|
|
32
57
|
|
|
33
58
|
## Requirements
|
|
34
59
|
|
package/connect.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rds_ssm_connect",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-ec2": "^3.363.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"eslint": "^8.44.0",
|
|
20
20
|
"eslint-config-standard": "^17.1.0",
|
|
21
|
-
"eslint-plugin-import": "^2.
|
|
21
|
+
"eslint-plugin-import": "^2.26.0",
|
|
22
22
|
"eslint-plugin-n": "^16.0.1",
|
|
23
23
|
"eslint-plugin-promise": "^6.1.1"
|
|
24
24
|
}
|