How to Enter Credentials in AWS Toolkit in IntelliJ
Including AWS credentials in AWS Toolkit in IntelliJ can be confusing and take way more time than it should. It’s easy to run into confounding error messages about invalid credentials, but here’s how you can get your Toolkit profile to finally load correctly.
Inside the boilerplate config file that comes with AWS Toolkit in IntelliJ below, you’ll find line-by-line instructions in all uppercase and bold.
Note: There may be other ways to include a profile name besides [default] and using the prefix source-profile, but this will at least get you started.
No go and get validated!
# Amazon Web Services Config File used by AWS CLI, SDKs, and tools
# This file was created by the AWS Toolkit for JetBrains plugin.
#
# Your AWS credentials are represented by access keys associated with IAM users.
# For information about how to create and manage AWS access keys for a user, see:
# https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
#
# This config file can store multiple access keys by placing each one in a
# named "profile". For information about how to change the access keys in a
# profile or to add a new profile with a different access key, see:
# https://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html
#
# If both a credential and config file exists, the values in the credential file
# take precedenceLEAVE [default] HERE OR COMMENT IT OUT (WITH #) AND CUT AND PASTE IT BELOW LIKE I HAVE IN THE FOUR-LINE BLOCK TO KEEP ALL LINES TOGETHER.[default]# The access key and secret key pair identify your account and grant access to AWS.LEAVE aws_access_key_id = YOUR ACCESS KEY ID FROM IAM HERE AND REPLACE YOUR ACCESS KEY ID FROM IAM WITH YOUR OWN ACCESS KEY ID FROM IAM OR COMMENT IT OUT (WITH #) AND INCLUDE IT IN A FOUR-LIKE BLOCK AS SHOWN BELOW.aws_access_key_id = YOUR ACCESS KEY ID FROM IAM# Treat your secret key like a password. Never share your secret key with anyone. Do
# not post it in online forums, or store it in a source control system. If your secret
# key is ever disclosed, immediately use IAM to delete the access key and secret key
# and create a new key pair. Then, update this file with the replacement key details.LEAVE aws_secret_access_key = YOUR SECRET ACCESS KEY ID FROM IAM HERE AND REPLACE YOUR SECRET ACCESS KEY ID FROM IAM WITH YOUR OWN SECRET ACCESS KEY ID FROM IAM OR COMMENT IT OUT (WITH #) AND INCLUDE IT IN A FOUR-LIKE BLOCK AS SHOWN BELOW.aws_secret_access_key = YOUR SECRET ACCESS KEY ID FROM IAM
--- END OF BOILERPLATE -- THE FOUR-LINE BLOCK BELOW SHOULD BE ALL YOU REALLY NEED TO GET STARTED AND FOR INTELLIJ TO ACCEPT YOUR AWS CREDENTIALS:[default]
source_profile = IAM USERNAME
aws_access_key_id = YOUR ACCESS KEY ID FROM IAM
aws_secret_access_key = YOUR ACCESS KEY ID FROM IAM
NOTES:
1. YOU MUST USE A PREFIX FOR THE IAM USERNAME, SUCH AS source_profile, AS IN MY EXAMPLE.
2. DON'T FORGET TO UNCOMMENT THE BLOCK OF FOUR ITEMS.
3. DON'T FORGET TO REMOVE THE BRACKETS THAT ARE IN THE BOILERPLATE FOR THE FOUR ITEMS (EXCEPT FOR [default]).