ech is a tool to manage AWS EC2 instances. It can
- Start/stop instances in multiple regions and users.
- Add the instance to you SSH profile.
- Install
aws-clifrom here. pip install ech
Suppose I have a instance with id i-01234567 in us-west-2 under default profile, and a instance with id i-76543210 in us-east-1 under profile tom. To manage those
-
Run
aws configureto add default profile if you haven't done so, and go to~/.aws/credentialsto add profile fortom. -
Create
awsh.tomlin your home directory:[servers] my-server = {id = "i-01234567", region="us-west-2"} another-server = {id = "i-76543210", region="us-east-1"}
Now you created two server alias
my-serveranother-server.
Now suppose you want to start your work on my-server.
ech start my-serverFirst, add this server to your SSH profile.
ech bind my-serverThe next step is straightforward:
ssh my-serverTip: You can directly access this instance in your VSCode by selecting my-server installing SSH plugin and remote explorer.
ech stop my-serverThat's it.
I am using this tool quite often in my personal study/work, but this tool may/should still have bugs. If so please submit an issue. Thanks!