> For the complete documentation index, see [llms.txt](https://docs.instruqt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.instruqt.com/sandboxes/cloud-accounts/aws-accounts/aws-environment-variables.md).

# AWS Environment Variables

Adding an AWS account to your track also sets a list of [environment variables](https://en.wikipedia.org/wiki/Environment_variable) that you can use in commands and scripts:

<table data-header-hidden><thead><tr><th width="527.0642716876642">Environment variable</th><th>Description</th></tr></thead><tbody><tr><td>Environment variable</td><td>Description</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNTS</code></td><td>A comma-separated list of project names that can be used to fill ${NAME} in the variables below</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_ACCOUNT_NAME</code></td><td>This injects the account display name</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_ACCOUNT_ID</code></td><td>This injects the account ID</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_USERNAME</code></td><td>This injects the username that can be used to sign in to the IAM user</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_PASSWORD</code></td><td>This injects the password that can be used to sign in to the IAM user</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_AWS_ACCESS_KEY_ID</code></td><td>This injects the access key id for this account</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_AWS_SECRET_ACCESS_KEY</code></td><td>This injects the secret access key for this account</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_ADMIN_USERNAME</code></td><td>This injects the username that can be used to sign is as the admin IAM user (Admin credentials are only injected into lifecycle scripts)</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_ADMIN_PASSWORD</code></td><td>This injects the password that can be used to sign in as the admin IAM user (Admin credentials are only injected into lifecycle scripts)</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_ADMIN_AWS_ACCESS_KEY_ID</code></td><td>This injects the admin access key id for this account (Admin credentials are only injected into lifecycle scripts)</td></tr><tr><td><code>INSTRUQT_AWS_ACCOUNT_${NAME}_ADMIN_AWS_SECRET_ACCESS_KEY</code></td><td>This injects the admin secret access key for this account (Admin credentials are only injected into lifecycle scripts)</td></tr></tbody></table>

### Example

This example shows the id of the AWS account from a terminal by using two environment variables. The value of the `INSTRUQT_AWS_ACCOUNTS` environment variable is inserted in the `INSTRUQT_AWS_ACCOUNT_${NAME}_ACCOUNT_ID` environment variable.

To follow along:

1. Start your AWS account track and start the first challenge.
2. Move over to the `Cloud CLI` terminal and enter the following command:

   ```xml
   eval echo "\${INSTRUQT_AWS_ACCOUNT_${INSTRUQT_AWS_ACCOUNTS}_ACCOUNT_ID}"
   ```

   ↳ The terminal shows the id of your AWS account project.
