Getting Started with stax2aws

Install and configure stax2aws in order to generate AWS credentials

Article Tags
On This Page
Installing stax2aws on WindowsInstalling stax2aws on macOS or LinuxUsageSee also

stax2aws is supported on Windows, macOS, and Linux.

Installing stax2aws on Windows

To install stax2aws on Windows, you should retrieve the latest release from the Releases page. Most users should retrieve the file. If you're using a 32-bit version of Windows, retrieve the file.

After downloading and extracting the zip file, open either the Command shell or PowerShell and navigate to the path with the stax2aws binary. Run the executable using the following commands to confirm that it can execute:

  • Command shell:

    C:\stax2aws> stax2aws.exe --help
  • PowerShell:

    PS C:\stax2aws> .\stax2aws.exe --help

You should see output similar to the following:

Installing stax2aws on macOS or Linux

To install stax2aws on macOS or Linux, the Homebrew package manager is recommended. You should install Homebrew before attempting the instructions below.

Run a Terminal or shell of choice and issue the following commands to install stax2aws:

$ brew tap stax-labs/homebrew-taps
$ brew install stax2aws

Once the installation completes, run a Terminal or shell of choice and run stax2aws to validate that it executes successfully:

$ stax2aws --help

You should see output similar to the following:


  1. Open a shell and issue the following command to commence the authentication flow:

    stax2aws login -i installation -o orgalias

    Replace installation above with your Stax installation, and orgalias with your Stax Organization Alias. Your Stax installation can be found by clicking the arrow () next to your Organization Alias in the Stax, then reviewing the INSTALLATION section of the menu. In the example below, the Stax Installation stax-au1 and Organization Alias stax-demo are used:

    stax2aws login -i stax-au1 -o stax-demo
  2. You will be directed to the Stax Console to authenticate your account. You can navigate to the console either by scanning the QR code, or browsing to the URL given. You will be prompted to accept the User Code and then log in to Stax normally. You should use whichever authentication method you typically use to authenticate to the Stax Console.

    stax2aws Web Login

    Once you log in, you'll be directed to return to your shell:

    stax2aws Web Login Complete
  3. stax2aws will prompt you to choose a role from the list that you are permitted to assume. You can use the arrow keys to browse the list, or start typing to narrow the list down to roles with particular keywords. Press Enter once your cursor is focused on the desired role.

stax2aws will then complete the role assumption and provide an AWS profile name. This profile name should be used when performing tasks with the AWS CLI or other tooling that utilizes IAM credentials. In the following example, the profile name is stax-au1-stax-demo:

$ aws sts get-caller-identity --profile stax-au1-stax-demo
    "UserId": "",
    "Account": "123456789012",
    "Arn": "arn:aws:sts::123456789012:assumed-role/staxid-readonly-role/"

When your AWS credentials expire you will be required to reauthenticate using the steps above.

See also