Easier AWS Role Switching with Terraless
A Terraform wrapper that simplifies assuming roles across AWS accounts – including MFA.
GitHub RepositoryTerraless is a wrapper around Terraform that I wrote to simplify working with many AWS accounts. Instead of juggling credentials for every account, you define the roles once and Terraless takes care of assuming them.
Status: I still use Terraless in my own projects. The dependencies are dated, though, and a modernization is on my list.
Core features
- Global and project config: Define common roles and profiles globally, then reference them in individual projects.
- MFA support: Terraless asks for your MFA token when needed, then retrieves and stores fresh AWS credentials.
- Docker image: Try it without installing anything:
docker run -ti --entrypoint bash odaniait/terraless
Basic commands
terraless info # show loaded plugins and configuration
terraless auth # authenticate and set up credential profiles
Alternatives worth knowing
The AWS ecosystem has evolved since Terraless was created. Depending on your setup, these may also fit:
- AWS IAM Identity Center (formerly AWS SSO) with
aws sso login– the standard way to access many accounts today. - aws-vault – stores credentials securely and handles role assumption and MFA.
- Terraform's
assume_rolein the AWS provider – lets Terraform itself switch into a role per provider.