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, 2019 in AWS by william
951 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, 2019 by revolver

Related Questions In AWS

+3 votes
3 answers
0 votes
1 answer
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, 2019 in AWS by fuji
1,239 views
0 votes
1 answer

Connecting AWS EC2 instance using Java

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

answered Mar 28, 2019 in AWS by Disha
4,278 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP