A repo of useful tools for interacting with cloud resources in various ways.
A poorly named script to easily port-forward or SSH to an Amazon ECS container. Intended for accessing remote nREPL instances, in theory it could be used for anything.
- babashka
- gum
- AWS CLI
- Including the SSM plugin
The script is a self-contained babashka script, so place anywhere in your path
after bb
and gum
and it should be fine.
awssh -- Easily port forward to an ECS container.
-h, --help Show this help
-f, --forward Specify ports to forward to. Leave unset to ssh directly.
Use local:remote or 1 port for local & remote
As per the help doc, there are 3 modes of use here:
In order to just connect to an ECS container, run without any arguments and select the container from the list.
For this, pass the -f
flag with a single port and that port will be used to forward both remotely and locally
For this, pass the -f
flag with a portspec like 2222:8080
which will create a forward from the local port 2222
to the remote port 8080
Similar to awssh, this allows you to run an arbitrary command on a pod.
The script is a self-contained babashka script, so place anywhere in your path
after bb
and gum
and it should be fine.
kubecon -- Run a command for a pod.
-h, --help Show this help
-f, --force Delete the caches and re-fetch all cached data
The bulk of the usage is just following the prompts. Namespaces and deployments remember the previously selected values, whereas the command history isn’t persisted (as this could leak secrets or other sensitive information)