DEV Community

Cover image for Invalid Grant error with AWS IAM Identity Center
Rich for AWS Community Builders

Posted on • Originally published at richdevelops.dev on

5

Invalid Grant error with AWS IAM Identity Center

Recently I was setting up a new computer which involved configuring the AWS CLI to use IAM Identity Center (formerly AWS SSO) to access my accounts. Normally this is a prety straight forward proposition. After running aws configure sso command you need to provide four pieces of information:

  • Session Name

  • Start URL

  • Region

  • Registration Scopes

AWS then authenticates you, you select your account, answer some more questions and it's done.

This time I keep getting an invalid_grant error after I authenticated myself.

The problem and solution turned out to be really simple. I selected the wrong region for IAM Identity Center. In my defence I mostly work with IAM Identity Center in my closest region but this was an older account and it was setup in a different region. Once I had the correct region everything worked correctly.

Top comments (0)

Best Practices for Running  Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK cover image

Best Practices for Running Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK

This post discusses the process of migrating a growing WordPress eShop business to AWS using AWS CDK for an easily scalable, high availability architecture. The detailed structure encompasses several pillars: Compute, Storage, Database, Cache, CDN, DNS, Security, and Backup.

Read full post