IAM Role (arn:aws:iam::xxxxxxxxxxxx:role/demo) cannot be assumed

0

I have created an assume role 2 months back in a dev account and update my root user in trust relationship . Terraform was working fine with that configuration

Now I have done the same thing , but while running terraform plan , am getting this error ,

Error: operation error STS: AssumeRole, https response error StatusCode: 403, RequestID: c0e2ae10-cbaf-44b3-9ecc-16e180405088, api error AccessDenied: User: arn:aws:sts::xxxxxxxxxxxx:assumed-role/demo/aws-go-sdk-1667304405742939100 is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::xxxxxxxxxxxx:role/demo

I dont know whats the reason , the roles and trust relationship were exactly same , but may I know whats the reason for this error?

I used the role which was created before and I ran terraform , which is working perfectly fine . The roles which created now are facing these errors

Has aws made any updates regarding these? Should I add any policies for this ? I cant get what is the cause for this error

Am able to switch role using the console , everything working good in the console ,I get these error only with terraform

  • Can you add the trust policy here? Also, the sts assume policy on the side that's assuming. You can redact account ids etc.

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions