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
779 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

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

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

answered Jun 2, 2018 in AWS by Cloud gunner
• 4,670 points
1,431 views
0 votes
1 answer

Using Shapely on AWS Lambda with Python 3

For some reason, the pip install of ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 58,090 points
2,568 views
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
933 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
3,856 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