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. There are two options for connecting to your account:
Add access keys to specify the AWS credentials for the account.
Add a named profile for the account that will be logged in using IAM Identity Center.
Complete the following procedures to make an initial connection, switch between connections, change connections, delete connections, and more.
Topics
Accessing credentials files
You should have already installed the AWS Toolkit for JetBrains. Depending on your connection option, you must have completed the following prerequisites:
AWS security credentials—Created 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, create one.
AWS IAM Identity Center (successor to AWS Single Sign-On) — Configured single sign-on by enabling IAM Identity Center, managing your identity source, and assigning SSO access to AWS accounts. For more information about this process, see the Getting started chapter of the AWS IAM Identity Center (successor to AWS Single Sign-On) User Guide.
Note
We recommend storing sensitive credential information, such as named profiles that include access keys,
in the credentials
file. Less sensitive configuration options, such as
named profiles that use IAM Identity Center for authentication, are normally stored in the
config
file.
You can store all your named profiles in a single file. If
you're using both credentials
and config
files, credentials
is opened by default in the IDE.
If there are credentials in both files for a profile sharing the same name,
the keys in the credentials
file take precedence. For more information,
see Configuration and credential file
settings in the AWS Command Line Interface User Guide.
-
To open the credentials for editing, do one of the following:
-
On the status bar, choose AWS: No credentials selected, and then choose Edit AWS Credential file(s).
-
Open AWS Explorer, if it isn't already open. Choose Configure AWS Connection, and then choose Edit AWS Credential file(s).
-
After you open the credentials file, you can edit it to specify access to your AWS account using access keys or IAM Identity Center.
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.
-
Open AWS Explorer, if it's not already open, and then choose Show Options Menu (the settings icon). Choose AWS Connection Settings. The current connection is selected.
You can also have more than one connection available, so that you can switch between them.
Adding multiple connections
Depending on the additional connection you want to add, you must first have completed one of the following tasks:
Created an 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.
Enabled IAM Identity Center access for the additional user's AWS account.
Note
We recommend storing sensitive credential information, such as named profiles that include access keys,
in the credentials
file. Less sensitive configuration options, such as
named profiles that use IAM Identity Center for authentication, are normally stored in the
config
file.
You can store all your named profiles in a single file. If
you're using both credentials
and config
files, credentials
is opened by default in the IDE.
If there are credentials in both files for a profile sharing the same name,
the keys in the credentials
file take precedence. For more information,
see Configuration and credential file
settings in the AWS Command Line Interface User Guide.
-
Connect for the first time, if you have not done so already.
-
To start editing the credentials file, do one of the following:
-
On the status bar, choose AWS Connection Settings, and then choose All Credentials, Edit AWS Credential file(s).
-
Open AWS Explorer, if it isn't already open, and then choose Show Options Menu (the settings icon). Choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).
-
-
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.
-
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
-
Add multiple connections, if you haven't done so already.
-
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.
-
-
Choose the named profile to use for the new connection. If it isn't listed, choose All Credentials, and then choose the named profile to use.
The AWS Toolkit for JetBrains switches to 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
-
Do one of the following:
-
On the status bar, choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).
-
Open AWS Explorer, if it isn't already open, and then choose Show Options Menu (the settings icon). Then choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).
-
-
Make your changes to the file, and then save and close the file.
Deleting a connection
-
Do one of the following:
-
On the status bar, choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).
-
Open AWS Explorer, if it isn't already open, and then choose Show Options Menu (the settings icon). Then choose AWS Connection Settings, All Credentials, Edit AWS Credential file(s).
-
-
In the file, completely delete the named profile (specifying access keys or IAM Identity Center key-value pairs) for the connection that you want to delete.
-
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.