Category Archives: Cloud

The terminal multiplexer tmux is a very useful and versatile tool. One thing that it apparently can’t do, however, is to automatically log a session to a log file. Such a feature can be very useful for interactive workloads. Sidenote: tmux also has a plugin manager and there are logging plugins available, but they don’t do exactly what I want. The manual way Logging all inputs/outputs can be done with a simple command: Manually executing this command at the creation of a pane, e.g. the start of a new session is possible but let’s be honest: I will forget it the next day already. So, an automatic method is needed. How it should work but doesn’t Tmux has hooks that trigger actions when certain events happen. The after-new-pane or after-new-session hooks would be ideal to execute the logging command whenever a new session or pane is opened. Adding the hook…

Read more

Working on AWS projects in the terminal can be annoying sometimes, especially when you have a large list of accounts and roles to work with. Typing in the multi-part command and the role ARN is just too much work to do over and over again:aws sts assume-role –role-arn arn:aws:iam::123456789012:role/roletoassumeDefining an alias for each role is impracticable, as well, because it would require to edit the AWS CLI config file (~/.aws/config and ~/.aws/credentials) and update the aliases (~/.bash_aliases or similar depending on your shell). It would be so much easier if the assume-role command would just query the AWS config. Just like this: The solution is the little helper programm assume-role in combination with fzf. Installation and setup The following assumes bash as your shell of choice and aptitude as the package manager. Other shells or package managers work just as well. AWS CLI Download and install AWS CLI: This covers…

Read more

2/2