AWS Toolkit for JetBrains
User Guide

Setting AWS Credentials for the AWS Toolkit for JetBrains

To access an AWS account by using the AWS Toolkit for JetBrains, you must first connect the toolkit to that account. You do this by specifying which AWS credentials for that account the toolkit will use to make that connection.

Complete the following procedures to make an initial connection, switch between connections, change connections, delete connections, and more.

Connecting for the First Time

You should have already installed the AWS Toolkit for JetBrains. To complete this procedure, you must have an access key (which contains both an access key ID value and a secret access key value) for a user in IAM (which we recommend), or an AWS account root user (which we strongly discourage). If you don't have an access key for a user in IAM already, create one.

  1. With your access key ID value and secret access key value ready, do one of the following:

    • On the status bar, choose AWS: No credentials selected, and then choose Edit AWS Credential file(s).

      
            AWS no credentials selected on the status bar
      
            Edit AWS credentials from the status bar
    • Open AWS Explorer, if it is not already open. Choose Configure AWS Connection, and then choose Edit AWS Credential file(s).

      
            Configure AWS connection from AWS Explorer
      
            Edit AWS credentials from AWS Explorer
  2. In the file, under [default], for aws_access_key_id, replace [accessKey1] with your access key ID value (for example, AKIAIOSFODNN7EXAMPLE).

    If prompted, select I want to edit this file anyway, and then choose OK.

  3. For aws_secret_access_key, replace [secretKey1] with your secret access key value (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY).

    The final results should look as shown here, following the named profile format.

    ... Other file contents omitted for brevity ... [default] # ... Some comments ... aws_access_key_id = AKIAIOSFODNN7EXAMPLE # ... Some more comments ... # ... Some more comments ... # ... Some more comments ... # ... Some more comments ... aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ... Other file contents omitted for brevity ...

    Note

    The AWS Toolkit for JetBrains currently supports the following configuration variables:

    • aws_access_key_id

    • aws_secret_access_key

    • aws_session_token

    • credential_process

    • mfa_serial

    • role_arn

    • source_profile

    For more information, see AWS CLI Configuration Variables in the AWS CLI Command Reference.

  4. Save and then close the file. The AWS Toolkit for JetBrains tries to connect to the account by using the preceding access key.

    After connecting, you can use the AWS Toolkit for JetBrains to work with AWS resources in that account, such as AWS serverless applications, AWS Lambda functions, and AWS CloudFormation stacks.

You can also have more than one connection available, so that you can switch between them.

After you connect, the AWS Toolkit for JetBrains selects the default AWS Region automatically. You might need to switch to working with different AWS resources that are in a different Region.

Getting the Current Connection

To check which connection the AWS Toolkit for JetBrains is currently using, do one of the following:

  • On the status bar, see the current connection displayed in the AWS Connection Settings area.

    
        The current connection in the status bar
  • Open AWS Explorer, if it's not already open, and then choose Show Options Menu (the gear icon). Choose AWS Connection Settings. The current connection is selected.

    
        The current connection in AWS Explorer

You can also have more than one connection available, so that you can switch between them.

Adding Multiple Connections

To complete this procedure, you must first have the additional access key (which contains both an access key ID value and a secret access key value) for a user in IAM (which we recommend) or AWS account root user (which we strongly discourage). If you don't have an access key for a user IAM already, create one.

  1. Connect for the first time, if you have not done so already.

  2. With the additional access key ID value and secret access key value ready, do one of the following:

    • On the status bar, choose AWS Connection Settings, and then choose All Credentials, Edit AWS Credential file(s).

      
            Choosing to edit AWS credentials from the status bar
    • Open AWS Explorer, if it isn't already open, and then choose Show Options Menu (the gear icon). Choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).

      
            Choosing to edit AWS credentials from AWS Explorer
  3. In the file, add a named profile for each additional connection. Profile names can contain only the uppercase letters A through Z, the lowercase letters a through z, the numbers 0 through 9, the hyphen character (-), and the underscore character (_). Profile names must be less than 64 characters in length.

    For example, for a named profile named myuser, use the following format.

    [profile myuser] aws_access_key_id = AKIAIOSFODNN7EXAMPLE aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

    Note

    The AWS Toolkit for JetBrains currently supports named profiles with only the following characters: A-Z, a-z, 0-9, underscore (_), and hyphen (-).

    The toolkit also currently supports only the following configuration variables:

    • aws_access_key_id

    • aws_secret_access_key

    • aws_session_token

    • credential_process

    • mfa_serial

    • role_arn

    • source_profile

    For more information, see AWS CLI Configuration Variables in the AWS CLI Command Reference.

  4. Save and then close the file. The AWS Toolkit for JetBrains displays the new connection in the AWS Connection Settings menu in both the status bar and in AWS Explorer.

Now that you have multiple connections, you can switch between them, if you want.

After you connect, you might need to switch to working with AWS resources in that account that are in a different AWS Region.

Switching between Connections

  1. Add multiple connections, if you haven't done so already.

  2. Do one of the following:

    • On the status bar, choose AWS Connection Settings.

    • Open AWS Explorer, if it isn't already open, and then choose AWS Connection Settings.

  3. Choose the name of the named profile to use for the new connection. If it isn't listed, first choose All Credentials, and then choose the name of the named profile to use.

    Switching the current connection

    The AWS Toolkit for JetBrains switches to using the new connection. This connection is now selected in the AWS Connection Settings menu in both the status bar and AWS Explorer.

After you connect, you might need to switch to working with AWS resources in that account that are in a different AWS Region.

Changing Connection Settings

  1. Do one of the following:

    • On the status bar, choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).

      
            Choosing the Edit AWS Credential files command
    • Open AWS Explorer, if it isn't already open, and then choose Show Options Menu (the gear icon). Then choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).

      
            Choosing the Edit AWS Credential files command
  2. Make your changes to the file, and then save and close the file.

Deleting a Connection

  1. Do one of the following:

    • On the status bar, choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).

      
            Choosing the Edit AWS Credential files command
    • Open AWS Explorer, if it isn't already open, and then choose Show Options Menu (the gear icon). Then choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).

      
            Choosing the Edit AWS Credential files command
  2. In the file, completely delete the named profile (including the named profile's name, access key ID, and secret access key) for the connection that you want to delete.

  3. Save and then close the file. The AWS Toolkit for JetBrains removes the deleted connection from the AWS Connection Settings menu in both the status bar and in AWS Explorer.

After you delete a connection, you might need to switch to a different connection or connect for the first time again.