Comments (7)
Hello @nc-furstenauw,
thanks for the idea. Could you provide some example how you run this via aws cli just to verify we are thinking about the same thing? Do you have exactly this in mind?
My idea for #256 was basically to be able to execute specific commands that would be defined in documents following that. I wanted to provide an interface on top of it in a new subcommand:
aws-gate run host document_alias
where document_alias would be defined in the configuration file. This would provide a user friendly way for user to create much more readable commands than just passing document names, e.g.
aws-gate run backend make_thread_dump
Then in ~/.aws-gate/config
if would look at a section (e.g. custom_commands) and get the document name from that.
What do you think about this interface?
from aws-gate.
However, looking at AWS-StartInteractiveCommand
, if I understand correctly, it takes {{command}} as argument and option to run the command as root. For this, I could imagine implementing aws-gate exec host command
(with option --elevated
to activate root user level permissions). If so, this shouldn't be difficult to implement.
Still waiting for some example uses to understand options though.
from aws-gate.
Yeah, the example you have in the second comment would be perfect. In awscli terms what I'd like would look something like aws ssm start-session --target ${host} --document-name AWS-StartInteractiveCommand --parameters command="bash -l"
. I'd like to do something like 'sudo su -c "cd; be rails c env" - user', but I currently can't get that to work for the cli & the documentation for this is fairly sparse, and I already have other ideas to get around that with what I do have working.
So something like aws-gate exec host command
would be perfect
from aws-gate.
@nc-furstenauw there is #374 open, let me know your feedback.
from aws-gate.
@xen0l yep it seems to be working exactly as expected! Might want to make a note in the documentation that the command (or commands) should be wrapped in double quotes, at least that's what I needed to do to get it to work for me
from aws-gate.
Uhm, I am not sure about the double quotes. I tested it today without just like aws-gate exec <hostname> bash -l
. What command did you run exactly? Once this is figured out, I will add tests and documentaiton and merge.
from aws-gate.
@nc-furstenauw merged and released in 0.9.0. if you see any issues, please report them.
from aws-gate.
Related Issues (20)
- Quiet option HOT 2
- no such file or directory: ~/.aws-gate/bin/session-manager-plugin when forwarding a session.
- Replace marshallow with pydantic
- Error occurred in aws-gate.exe_Windows_amd64 (Release 0.11.2) HOT 3
- Add support for remote port forwarding
- [EC2] InvalidInstanceID.NotFound can occur
- Doesn't work on M2 macbook pro HOT 8
- Stopped working on ubuntu 23.04 HOT 2
- Update the list of AWS EC2 regions
- request: make `list` similar to `session` e.g. show instance-ids that match a specific tag
- Allow colons in tag names
- Add support for Raspberry Pi
- Distribute .exe file of aws-gate on Windows HOT 1
- Provide MSI for better Windows integration
- aws-gate ssh-proxy not able to create ~/.aws-gate directory HOT 1
- Provide support for EC2 serial console
- AccessDeniedException when terminating session with assumed role
- provide a sample to use aws-gate for port forward to access to databases
- does not support windows HOT 1
- Support `CNAME` dns records HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-gate.