IAM commands not woking in AWS CLI

0 votes

I have my AWS CLI working fine with all the AWS commands but when I use an IAM command it fails.

[user@web1:~] #aws iam create-account-alias --account-alias=mcollective

An error occurred (InvalidClientTokenId) when calling the CreateAccountAlias operation: The security token included in the request is invalid.

Can someone help me with this?

Mar 28 in AWS by william
19 views

1 answer to this question.

0 votes

The best fix for this can be as follows:

Change your user to root and then run this command

aws iam create-account-alias --account-alias=mcollective

This should work.

answered Mar 28 by revolver

Related Questions In AWS

+3 votes
3 answers
0 votes
1 answer
0 votes
1 answer

if instance is a part of some AutoScaling Group in AWS or not ?

You can run this command below on ...READ MORE

answered Jun 1, 2018 in AWS by Cloud gunner
• 4,260 points
45 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Numpy module not found in EC2 instance

The most probable reason can be like ...READ MORE

answered Mar 28 in AWS by fuji
19 views
0 votes
1 answer

Connecting AWS EC2 instance using Java

An Amazon EC2 instance is just like ...READ MORE

answered Mar 28 in AWS by Disha
164 views