Matt W
Matt W

Reputation: 12423

IAM user security credentials not reflected in AWS credentials file

TL;DR: Is it possible to use the AWS CLI to update the locally stored credentials file with the IAM users information in my AWS account?

I am following the instructions in this AWS Amplify tutorial which includes these steps:

  1. Creating an IAM user
  2. Providing the IAM user credentials to the amplify CLI

Step 2 updated my local \.aws\credentials file to include a profile for the IAM user created in step 1.

After this, of my own accord, I went back into the IAM console and created a new access key ID.

This new access key is not included in my local \.aws\credentials file, so I would like to add it. How can I do that?

I have tried copying the profile entry created by the amplify CLI tool and pasting in the aws_access_key_id and aws_secret_access_key. However, I am not sure how to update the toolkit_artifact_guid. As I am creating a new profile for the same IAM user, should I use the same toolkit_artifact_guid?

Upvotes: 0

Views: 416

Answers (1)

Connor K
Connor K

Reputation: 26

The aws configure command can be used to add a new profile to your config

Use the --profile flag to create a profile in the .aws/config file.

https://docs.aws.amazon.com/cli/latest/reference/configure/

toolkit-artifact-guid is a piece of metadata used by tooling, such as extensions for an IDE. It is not required for specifying a new IAM profile

Upvotes: 1

Related Questions