cloudx-proxy 0.3.1__tar.gz → 0.3.3__tar.gz

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.
Files changed (22) hide show
  1. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/CHANGELOG.md +4 -0
  2. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/PKG-INFO +91 -45
  3. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/README.md +90 -44
  4. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy/_version.py +2 -2
  5. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy.egg-info/PKG-INFO +91 -45
  6. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/.github/workflows/release.yml +0 -0
  7. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/.gitignore +0 -0
  8. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/.releaserc +0 -0
  9. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/CONTRIBUTING.md +0 -0
  10. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/LICENSE +0 -0
  11. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy/__init__.py +0 -0
  12. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy/cli.py +0 -0
  13. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy/core.py +0 -0
  14. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy/setup.py +0 -0
  15. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy.egg-info/SOURCES.txt +0 -0
  16. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy.egg-info/dependency_links.txt +0 -0
  17. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy.egg-info/entry_points.txt +0 -0
  18. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy.egg-info/requires.txt +0 -0
  19. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/cloudx_proxy.egg-info/top_level.txt +0 -0
  20. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/package.json +0 -0
  21. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/pyproject.toml +0 -0
  22. {cloudx_proxy-0.3.1 → cloudx_proxy-0.3.3}/setup.cfg +0 -0
@@ -1,3 +1,7 @@
1
+ ## [0.3.3](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.2...v0.3.3) (2025-02-09)
2
+
3
+ ## [0.3.2](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.1...v0.3.2) (2025-02-09)
4
+
1
5
  ## [0.3.1](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.0...v0.3.1) (2025-02-09)
2
6
 
3
7
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
5
5
  Author-email: easytocloud <info@easytocloud.com>
6
6
  License: MIT License
@@ -63,16 +63,37 @@ cloudX-proxy enables seamless SSH connections from VSCode to EC2 instances using
63
63
 
64
64
  ## Prerequisites
65
65
 
66
- 1. **AWS CLI v2** - [Installation Guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
67
- 2. **AWS Session Manager Plugin** - [Installation Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
68
- 3. **OpenSSH Client**
66
+ 1. **AWS CLI v2** - Used to configure AWS profiles and credentials
67
+ - [Installation Guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
68
+ - Required for `aws configure` during setup
69
+ - Handles AWS credentials and region configuration
70
+
71
+ 2. **AWS Session Manager Plugin** - Enables secure tunneling through AWS Systems Manager
72
+ - [Installation Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
73
+ - Provides the secure connection channel
74
+ - No need for public IP addresses or direct SSH access
75
+
76
+ 3. **OpenSSH Client** - Handles SSH key management and connections
69
77
  - Windows: [Microsoft's OpenSSH Installation Guide](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui)
70
78
  - macOS/Linux: Usually pre-installed
71
- 4. **uv** - Python package installer and resolver
79
+ - Manages SSH keys and configurations
80
+ - Provides the SSH client for VSCode Remote
81
+
82
+ 4. **uv** - Modern Python package installer and virtual environment manager
72
83
  ```bash
73
84
  pip install uv
74
85
  ```
75
- 5. **VSCode with Remote SSH Extension** installed
86
+ The `uvx` command from uv automatically:
87
+ - Creates an isolated virtual environment for each package
88
+ - Downloads and installs the package and its dependencies
89
+ - Runs the package without explicit environment activation
90
+
91
+ This means you can run cloudX-proxy directly with `uvx cloudx-proxy` without manually managing virtual environments or dependencies.
92
+
93
+ 5. **VSCode with Remote SSH Extension** - Your development environment
94
+ - Provides the integrated development environment
95
+ - Uses the SSH configuration to connect to instances
96
+ - Handles file synchronization and terminal sessions
76
97
 
77
98
  ## AWS Credentials Setup
78
99
 
@@ -81,19 +102,11 @@ The proxy expects to find AWS credentials in a profile named 'vscode' by default
81
102
  - Establishing SSM sessions
82
103
  - Pushing SSH keys via EC2 Instance Connect
83
104
 
84
- Once the SSH session is established, the user has to further configure the instance using `generate-sso-config` tool. This is a one-time setup unless the user's access to AWS accounts changes, in which case the user should re-run the `generate-sso-config` tool.
85
-
86
- It is recommended to use --generate-directories and --use-ou-structure to create working directories for each account the user has access to.
87
-
88
- Everytime the user connects to the instance, `ssostart` will authenticate the user with AWS SSO and generate temporary credentials.
89
-
90
- This ensures you have the appropriate AWS access both for connecting to the instance and for working within it.
91
-
92
- The proxy also supports easytocloud's AWS profile organizer. If you use multiple AWS environments, you can store your AWS configuration and credentials in `~/.aws/aws-envs/<environment>` directories and use the `--aws-env` option to specify which environment to use.
105
+ The proxy supports easytocloud's AWS profile organizer for managing multiple AWS environments. You can store your AWS configuration and credentials in `~/.aws/aws-envs/<environment>` directories and use the `--aws-env` option to specify which environment to use.
93
106
 
94
107
  ## Setup
95
108
 
96
- cloudX-proxy now includes a setup command that automates the entire configuration process:
109
+ cloudX-proxy includes a setup command that automates the entire configuration process:
97
110
 
98
111
  ```bash
99
112
  # Basic setup with defaults (vscode profile and key)
@@ -130,25 +143,23 @@ The setup command will:
130
143
  - Offers to wait for setup completion
131
144
  - Monitors setup progress
132
145
 
133
- ### Example SSH Configuration
146
+ ### SSH Configuration
134
147
 
135
- The setup command generates a configuration structure like this:
148
+ The setup command configures SSH to use cloudX-proxy as a ProxyCommand, enabling seamless connections through AWS Systems Manager. It creates:
136
149
 
137
- ```
138
- # Base environment config (created once per environment)
139
- Host cloudx-{env}-*
140
- User ec2-user
141
- IdentityAgent ~/.1password/agent.sock # If using 1Password
142
- IdentityFile ~/.ssh/vscode/key.pub # .pub for 1Password, no .pub otherwise
143
- IdentitiesOnly yes # If using 1Password
144
- ProxyCommand uvx cloudx-proxy connect %h %p --profile profile --aws-env env
145
-
146
- # Host entries (added for each instance)
147
- Host cloudx-{env}-hostname
148
- HostName i-1234567890
149
- ```
150
+ 1. A base configuration for each environment (cloudx-{env}-*) with:
151
+ - User and key settings
152
+ - 1Password integration if selected
153
+ - ProxyCommand with appropriate parameters
154
+
155
+ 2. Individual host entries for each instance:
156
+ - Uses consistent naming (cloudx-{env}-hostname)
157
+ - Maps to instance IDs automatically
158
+ - Inherits environment-level settings
150
159
 
151
- When adding new instances to an existing environment, the setup command will only add the specific host entry, preserving the existing environment configuration.
160
+ When adding new instances to an existing environment, you can choose to:
161
+ - Override the environment configuration with new settings
162
+ - Add instance-specific settings while preserving the environment config
152
163
 
153
164
  ### VSCode Configuration
154
165
 
@@ -163,28 +174,62 @@ When adding new instances to an existing environment, the setup command will onl
163
174
 
164
175
  ## Usage
165
176
 
166
- ### Command Line
177
+ ### Command Line Options
167
178
 
179
+ #### Setup Command
168
180
  ```bash
169
- # Setup new environment and instance
170
- uvx cloudx-proxy setup --profile myprofile --aws-env prod
181
+ uvx cloudx-proxy setup [OPTIONS]
182
+ ```
183
+
184
+ Options:
185
+ - `--profile` (default: vscode): AWS profile to use. The profile's IAM user should follow the format cloudX-{env}-{user}. The environment part will be used as the default environment during setup.
186
+ - `--ssh-key` (default: vscode): Name of the SSH key to create/use. The key will be stored in ~/.ssh/vscode/{name}. This same name can be used in the connect command.
187
+ - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
188
+
189
+ Example usage:
190
+ ```bash
191
+ # Basic setup with defaults
192
+ uvx cloudx-proxy setup
193
+
194
+ # Setup with custom profile and key
195
+ uvx cloudx-proxy setup --profile myprofile --ssh-key mykey
171
196
 
172
- # Add instance to existing environment
197
+ # Setup with AWS environment
173
198
  uvx cloudx-proxy setup --profile myprofile --aws-env prod
199
+ ```
174
200
 
175
- # Connect to instance
176
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
201
+ #### Connect Command
202
+ ```bash
203
+ uvx cloudx-proxy connect INSTANCE_ID [PORT] [OPTIONS]
204
+ ```
205
+
206
+ Arguments:
207
+ - `INSTANCE_ID`: The EC2 instance ID to connect to (e.g., i-0123456789abcdef0)
208
+ - `PORT` (default: 22): The port to forward for SSH connection
177
209
 
178
- # Connect with custom port
179
- uvx cloudx-proxy connect i-0123456789abcdef0 2222 --profile myprofile
210
+ Options:
211
+ - `--profile` (default: vscode): AWS profile to use. Should match the profile used in setup.
212
+ - `--ssh-key` (default: vscode): Name of the SSH key to use. Should match the key name used in setup.
213
+ - `--region` (optional): AWS region to use. If not specified, uses the region from the AWS profile.
214
+ - `--aws-env` (optional): AWS environment directory to use. Should match the environment used in setup.
215
+
216
+ Example usage:
217
+ ```bash
218
+ # Connect using defaults
219
+ uvx cloudx-proxy connect i-0123456789abcdef0
180
220
 
181
- # Connect with different region
182
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --region us-east-1
221
+ # Connect with custom profile and key
222
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --ssh-key mykey
183
223
 
184
- # Connect with custom key
185
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
224
+ # Connect with custom port and region
225
+ uvx cloudx-proxy connect i-0123456789abcdef0 2222 --region us-east-1
226
+
227
+ # Connect with AWS environment
228
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
186
229
  ```
187
230
 
231
+ Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
232
+
188
233
  ### VSCode
189
234
 
190
235
  1. Click the "Remote Explorer" icon in the VSCode sidebar
@@ -195,7 +240,7 @@ uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
195
240
 
196
241
  ## AWS Permissions
197
242
 
198
- The AWS user/role needs these permissions:
243
+ The AWS user needs these permissions:
199
244
 
200
245
  ```json
201
246
  {
@@ -215,6 +260,7 @@ The AWS user/role needs these permissions:
215
260
  ]
216
261
  }
217
262
  ```
263
+ Note: This user should be created using the cloudX-user product from Service Catalog in the AWS Console. This assures proper permissions and naming conventions.
218
264
 
219
265
  ## Troubleshooting
220
266
 
@@ -13,16 +13,37 @@ cloudX-proxy enables seamless SSH connections from VSCode to EC2 instances using
13
13
 
14
14
  ## Prerequisites
15
15
 
16
- 1. **AWS CLI v2** - [Installation Guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
17
- 2. **AWS Session Manager Plugin** - [Installation Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
18
- 3. **OpenSSH Client**
16
+ 1. **AWS CLI v2** - Used to configure AWS profiles and credentials
17
+ - [Installation Guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
18
+ - Required for `aws configure` during setup
19
+ - Handles AWS credentials and region configuration
20
+
21
+ 2. **AWS Session Manager Plugin** - Enables secure tunneling through AWS Systems Manager
22
+ - [Installation Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
23
+ - Provides the secure connection channel
24
+ - No need for public IP addresses or direct SSH access
25
+
26
+ 3. **OpenSSH Client** - Handles SSH key management and connections
19
27
  - Windows: [Microsoft's OpenSSH Installation Guide](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui)
20
28
  - macOS/Linux: Usually pre-installed
21
- 4. **uv** - Python package installer and resolver
29
+ - Manages SSH keys and configurations
30
+ - Provides the SSH client for VSCode Remote
31
+
32
+ 4. **uv** - Modern Python package installer and virtual environment manager
22
33
  ```bash
23
34
  pip install uv
24
35
  ```
25
- 5. **VSCode with Remote SSH Extension** installed
36
+ The `uvx` command from uv automatically:
37
+ - Creates an isolated virtual environment for each package
38
+ - Downloads and installs the package and its dependencies
39
+ - Runs the package without explicit environment activation
40
+
41
+ This means you can run cloudX-proxy directly with `uvx cloudx-proxy` without manually managing virtual environments or dependencies.
42
+
43
+ 5. **VSCode with Remote SSH Extension** - Your development environment
44
+ - Provides the integrated development environment
45
+ - Uses the SSH configuration to connect to instances
46
+ - Handles file synchronization and terminal sessions
26
47
 
27
48
  ## AWS Credentials Setup
28
49
 
@@ -31,19 +52,11 @@ The proxy expects to find AWS credentials in a profile named 'vscode' by default
31
52
  - Establishing SSM sessions
32
53
  - Pushing SSH keys via EC2 Instance Connect
33
54
 
34
- Once the SSH session is established, the user has to further configure the instance using `generate-sso-config` tool. This is a one-time setup unless the user's access to AWS accounts changes, in which case the user should re-run the `generate-sso-config` tool.
35
-
36
- It is recommended to use --generate-directories and --use-ou-structure to create working directories for each account the user has access to.
37
-
38
- Everytime the user connects to the instance, `ssostart` will authenticate the user with AWS SSO and generate temporary credentials.
39
-
40
- This ensures you have the appropriate AWS access both for connecting to the instance and for working within it.
41
-
42
- The proxy also supports easytocloud's AWS profile organizer. If you use multiple AWS environments, you can store your AWS configuration and credentials in `~/.aws/aws-envs/<environment>` directories and use the `--aws-env` option to specify which environment to use.
55
+ The proxy supports easytocloud's AWS profile organizer for managing multiple AWS environments. You can store your AWS configuration and credentials in `~/.aws/aws-envs/<environment>` directories and use the `--aws-env` option to specify which environment to use.
43
56
 
44
57
  ## Setup
45
58
 
46
- cloudX-proxy now includes a setup command that automates the entire configuration process:
59
+ cloudX-proxy includes a setup command that automates the entire configuration process:
47
60
 
48
61
  ```bash
49
62
  # Basic setup with defaults (vscode profile and key)
@@ -80,25 +93,23 @@ The setup command will:
80
93
  - Offers to wait for setup completion
81
94
  - Monitors setup progress
82
95
 
83
- ### Example SSH Configuration
96
+ ### SSH Configuration
84
97
 
85
- The setup command generates a configuration structure like this:
98
+ The setup command configures SSH to use cloudX-proxy as a ProxyCommand, enabling seamless connections through AWS Systems Manager. It creates:
86
99
 
87
- ```
88
- # Base environment config (created once per environment)
89
- Host cloudx-{env}-*
90
- User ec2-user
91
- IdentityAgent ~/.1password/agent.sock # If using 1Password
92
- IdentityFile ~/.ssh/vscode/key.pub # .pub for 1Password, no .pub otherwise
93
- IdentitiesOnly yes # If using 1Password
94
- ProxyCommand uvx cloudx-proxy connect %h %p --profile profile --aws-env env
95
-
96
- # Host entries (added for each instance)
97
- Host cloudx-{env}-hostname
98
- HostName i-1234567890
99
- ```
100
+ 1. A base configuration for each environment (cloudx-{env}-*) with:
101
+ - User and key settings
102
+ - 1Password integration if selected
103
+ - ProxyCommand with appropriate parameters
104
+
105
+ 2. Individual host entries for each instance:
106
+ - Uses consistent naming (cloudx-{env}-hostname)
107
+ - Maps to instance IDs automatically
108
+ - Inherits environment-level settings
100
109
 
101
- When adding new instances to an existing environment, the setup command will only add the specific host entry, preserving the existing environment configuration.
110
+ When adding new instances to an existing environment, you can choose to:
111
+ - Override the environment configuration with new settings
112
+ - Add instance-specific settings while preserving the environment config
102
113
 
103
114
  ### VSCode Configuration
104
115
 
@@ -113,28 +124,62 @@ When adding new instances to an existing environment, the setup command will onl
113
124
 
114
125
  ## Usage
115
126
 
116
- ### Command Line
127
+ ### Command Line Options
117
128
 
129
+ #### Setup Command
118
130
  ```bash
119
- # Setup new environment and instance
120
- uvx cloudx-proxy setup --profile myprofile --aws-env prod
131
+ uvx cloudx-proxy setup [OPTIONS]
132
+ ```
133
+
134
+ Options:
135
+ - `--profile` (default: vscode): AWS profile to use. The profile's IAM user should follow the format cloudX-{env}-{user}. The environment part will be used as the default environment during setup.
136
+ - `--ssh-key` (default: vscode): Name of the SSH key to create/use. The key will be stored in ~/.ssh/vscode/{name}. This same name can be used in the connect command.
137
+ - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
138
+
139
+ Example usage:
140
+ ```bash
141
+ # Basic setup with defaults
142
+ uvx cloudx-proxy setup
143
+
144
+ # Setup with custom profile and key
145
+ uvx cloudx-proxy setup --profile myprofile --ssh-key mykey
121
146
 
122
- # Add instance to existing environment
147
+ # Setup with AWS environment
123
148
  uvx cloudx-proxy setup --profile myprofile --aws-env prod
149
+ ```
124
150
 
125
- # Connect to instance
126
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
151
+ #### Connect Command
152
+ ```bash
153
+ uvx cloudx-proxy connect INSTANCE_ID [PORT] [OPTIONS]
154
+ ```
155
+
156
+ Arguments:
157
+ - `INSTANCE_ID`: The EC2 instance ID to connect to (e.g., i-0123456789abcdef0)
158
+ - `PORT` (default: 22): The port to forward for SSH connection
127
159
 
128
- # Connect with custom port
129
- uvx cloudx-proxy connect i-0123456789abcdef0 2222 --profile myprofile
160
+ Options:
161
+ - `--profile` (default: vscode): AWS profile to use. Should match the profile used in setup.
162
+ - `--ssh-key` (default: vscode): Name of the SSH key to use. Should match the key name used in setup.
163
+ - `--region` (optional): AWS region to use. If not specified, uses the region from the AWS profile.
164
+ - `--aws-env` (optional): AWS environment directory to use. Should match the environment used in setup.
165
+
166
+ Example usage:
167
+ ```bash
168
+ # Connect using defaults
169
+ uvx cloudx-proxy connect i-0123456789abcdef0
130
170
 
131
- # Connect with different region
132
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --region us-east-1
171
+ # Connect with custom profile and key
172
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --ssh-key mykey
133
173
 
134
- # Connect with custom key
135
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
174
+ # Connect with custom port and region
175
+ uvx cloudx-proxy connect i-0123456789abcdef0 2222 --region us-east-1
176
+
177
+ # Connect with AWS environment
178
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
136
179
  ```
137
180
 
181
+ Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
182
+
138
183
  ### VSCode
139
184
 
140
185
  1. Click the "Remote Explorer" icon in the VSCode sidebar
@@ -145,7 +190,7 @@ uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
145
190
 
146
191
  ## AWS Permissions
147
192
 
148
- The AWS user/role needs these permissions:
193
+ The AWS user needs these permissions:
149
194
 
150
195
  ```json
151
196
  {
@@ -165,6 +210,7 @@ The AWS user/role needs these permissions:
165
210
  ]
166
211
  }
167
212
  ```
213
+ Note: This user should be created using the cloudX-user product from Service Catalog in the AWS Console. This assures proper permissions and naming conventions.
168
214
 
169
215
  ## Troubleshooting
170
216
 
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.3.1'
16
- __version_tuple__ = version_tuple = (0, 3, 1)
15
+ __version__ = version = '0.3.3'
16
+ __version_tuple__ = version_tuple = (0, 3, 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
5
5
  Author-email: easytocloud <info@easytocloud.com>
6
6
  License: MIT License
@@ -63,16 +63,37 @@ cloudX-proxy enables seamless SSH connections from VSCode to EC2 instances using
63
63
 
64
64
  ## Prerequisites
65
65
 
66
- 1. **AWS CLI v2** - [Installation Guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
67
- 2. **AWS Session Manager Plugin** - [Installation Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
68
- 3. **OpenSSH Client**
66
+ 1. **AWS CLI v2** - Used to configure AWS profiles and credentials
67
+ - [Installation Guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
68
+ - Required for `aws configure` during setup
69
+ - Handles AWS credentials and region configuration
70
+
71
+ 2. **AWS Session Manager Plugin** - Enables secure tunneling through AWS Systems Manager
72
+ - [Installation Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
73
+ - Provides the secure connection channel
74
+ - No need for public IP addresses or direct SSH access
75
+
76
+ 3. **OpenSSH Client** - Handles SSH key management and connections
69
77
  - Windows: [Microsoft's OpenSSH Installation Guide](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui)
70
78
  - macOS/Linux: Usually pre-installed
71
- 4. **uv** - Python package installer and resolver
79
+ - Manages SSH keys and configurations
80
+ - Provides the SSH client for VSCode Remote
81
+
82
+ 4. **uv** - Modern Python package installer and virtual environment manager
72
83
  ```bash
73
84
  pip install uv
74
85
  ```
75
- 5. **VSCode with Remote SSH Extension** installed
86
+ The `uvx` command from uv automatically:
87
+ - Creates an isolated virtual environment for each package
88
+ - Downloads and installs the package and its dependencies
89
+ - Runs the package without explicit environment activation
90
+
91
+ This means you can run cloudX-proxy directly with `uvx cloudx-proxy` without manually managing virtual environments or dependencies.
92
+
93
+ 5. **VSCode with Remote SSH Extension** - Your development environment
94
+ - Provides the integrated development environment
95
+ - Uses the SSH configuration to connect to instances
96
+ - Handles file synchronization and terminal sessions
76
97
 
77
98
  ## AWS Credentials Setup
78
99
 
@@ -81,19 +102,11 @@ The proxy expects to find AWS credentials in a profile named 'vscode' by default
81
102
  - Establishing SSM sessions
82
103
  - Pushing SSH keys via EC2 Instance Connect
83
104
 
84
- Once the SSH session is established, the user has to further configure the instance using `generate-sso-config` tool. This is a one-time setup unless the user's access to AWS accounts changes, in which case the user should re-run the `generate-sso-config` tool.
85
-
86
- It is recommended to use --generate-directories and --use-ou-structure to create working directories for each account the user has access to.
87
-
88
- Everytime the user connects to the instance, `ssostart` will authenticate the user with AWS SSO and generate temporary credentials.
89
-
90
- This ensures you have the appropriate AWS access both for connecting to the instance and for working within it.
91
-
92
- The proxy also supports easytocloud's AWS profile organizer. If you use multiple AWS environments, you can store your AWS configuration and credentials in `~/.aws/aws-envs/<environment>` directories and use the `--aws-env` option to specify which environment to use.
105
+ The proxy supports easytocloud's AWS profile organizer for managing multiple AWS environments. You can store your AWS configuration and credentials in `~/.aws/aws-envs/<environment>` directories and use the `--aws-env` option to specify which environment to use.
93
106
 
94
107
  ## Setup
95
108
 
96
- cloudX-proxy now includes a setup command that automates the entire configuration process:
109
+ cloudX-proxy includes a setup command that automates the entire configuration process:
97
110
 
98
111
  ```bash
99
112
  # Basic setup with defaults (vscode profile and key)
@@ -130,25 +143,23 @@ The setup command will:
130
143
  - Offers to wait for setup completion
131
144
  - Monitors setup progress
132
145
 
133
- ### Example SSH Configuration
146
+ ### SSH Configuration
134
147
 
135
- The setup command generates a configuration structure like this:
148
+ The setup command configures SSH to use cloudX-proxy as a ProxyCommand, enabling seamless connections through AWS Systems Manager. It creates:
136
149
 
137
- ```
138
- # Base environment config (created once per environment)
139
- Host cloudx-{env}-*
140
- User ec2-user
141
- IdentityAgent ~/.1password/agent.sock # If using 1Password
142
- IdentityFile ~/.ssh/vscode/key.pub # .pub for 1Password, no .pub otherwise
143
- IdentitiesOnly yes # If using 1Password
144
- ProxyCommand uvx cloudx-proxy connect %h %p --profile profile --aws-env env
145
-
146
- # Host entries (added for each instance)
147
- Host cloudx-{env}-hostname
148
- HostName i-1234567890
149
- ```
150
+ 1. A base configuration for each environment (cloudx-{env}-*) with:
151
+ - User and key settings
152
+ - 1Password integration if selected
153
+ - ProxyCommand with appropriate parameters
154
+
155
+ 2. Individual host entries for each instance:
156
+ - Uses consistent naming (cloudx-{env}-hostname)
157
+ - Maps to instance IDs automatically
158
+ - Inherits environment-level settings
150
159
 
151
- When adding new instances to an existing environment, the setup command will only add the specific host entry, preserving the existing environment configuration.
160
+ When adding new instances to an existing environment, you can choose to:
161
+ - Override the environment configuration with new settings
162
+ - Add instance-specific settings while preserving the environment config
152
163
 
153
164
  ### VSCode Configuration
154
165
 
@@ -163,28 +174,62 @@ When adding new instances to an existing environment, the setup command will onl
163
174
 
164
175
  ## Usage
165
176
 
166
- ### Command Line
177
+ ### Command Line Options
167
178
 
179
+ #### Setup Command
168
180
  ```bash
169
- # Setup new environment and instance
170
- uvx cloudx-proxy setup --profile myprofile --aws-env prod
181
+ uvx cloudx-proxy setup [OPTIONS]
182
+ ```
183
+
184
+ Options:
185
+ - `--profile` (default: vscode): AWS profile to use. The profile's IAM user should follow the format cloudX-{env}-{user}. The environment part will be used as the default environment during setup.
186
+ - `--ssh-key` (default: vscode): Name of the SSH key to create/use. The key will be stored in ~/.ssh/vscode/{name}. This same name can be used in the connect command.
187
+ - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
188
+
189
+ Example usage:
190
+ ```bash
191
+ # Basic setup with defaults
192
+ uvx cloudx-proxy setup
193
+
194
+ # Setup with custom profile and key
195
+ uvx cloudx-proxy setup --profile myprofile --ssh-key mykey
171
196
 
172
- # Add instance to existing environment
197
+ # Setup with AWS environment
173
198
  uvx cloudx-proxy setup --profile myprofile --aws-env prod
199
+ ```
174
200
 
175
- # Connect to instance
176
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
201
+ #### Connect Command
202
+ ```bash
203
+ uvx cloudx-proxy connect INSTANCE_ID [PORT] [OPTIONS]
204
+ ```
205
+
206
+ Arguments:
207
+ - `INSTANCE_ID`: The EC2 instance ID to connect to (e.g., i-0123456789abcdef0)
208
+ - `PORT` (default: 22): The port to forward for SSH connection
177
209
 
178
- # Connect with custom port
179
- uvx cloudx-proxy connect i-0123456789abcdef0 2222 --profile myprofile
210
+ Options:
211
+ - `--profile` (default: vscode): AWS profile to use. Should match the profile used in setup.
212
+ - `--ssh-key` (default: vscode): Name of the SSH key to use. Should match the key name used in setup.
213
+ - `--region` (optional): AWS region to use. If not specified, uses the region from the AWS profile.
214
+ - `--aws-env` (optional): AWS environment directory to use. Should match the environment used in setup.
215
+
216
+ Example usage:
217
+ ```bash
218
+ # Connect using defaults
219
+ uvx cloudx-proxy connect i-0123456789abcdef0
180
220
 
181
- # Connect with different region
182
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --region us-east-1
221
+ # Connect with custom profile and key
222
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --ssh-key mykey
183
223
 
184
- # Connect with custom key
185
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
224
+ # Connect with custom port and region
225
+ uvx cloudx-proxy connect i-0123456789abcdef0 2222 --region us-east-1
226
+
227
+ # Connect with AWS environment
228
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
186
229
  ```
187
230
 
231
+ Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
232
+
188
233
  ### VSCode
189
234
 
190
235
  1. Click the "Remote Explorer" icon in the VSCode sidebar
@@ -195,7 +240,7 @@ uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
195
240
 
196
241
  ## AWS Permissions
197
242
 
198
- The AWS user/role needs these permissions:
243
+ The AWS user needs these permissions:
199
244
 
200
245
  ```json
201
246
  {
@@ -215,6 +260,7 @@ The AWS user/role needs these permissions:
215
260
  ]
216
261
  }
217
262
  ```
263
+ Note: This user should be created using the cloudX-user product from Service Catalog in the AWS Console. This assures proper permissions and naming conventions.
218
264
 
219
265
  ## Troubleshooting
220
266
 
File without changes
File without changes
File without changes
File without changes
File without changes