title: AWS cli: not authorized to perform: sts:AssumeRole on resource
body: <p>I have an AWS account in which I am assuming a role named A(<code>role-A</code>), from that role I have created another role named B(<code>role-B</code>) through the web console and attached the administrator policy to that role</p>
  
  <p>Here is cli configuration</p>
  
  <pre><code>[default]
  aws_access_key_id = &lt;&gt;
  aws_secret_access_key = &lt;&gt;
  region = eu-central-1
  
  [role-B]
  role_arn = arn:aws:iam::&lt;id&gt;:role/ics-role
  mfa_serial = arn:aws:iam::&lt;id&gt;:mfa/&lt;name&gt;
  external_id = &lt;name&gt;
  source_profile = default
  </code></pre>
  
  <p><code>role-B</code> which I have created from <code>role-A</code></p>
  
  <p>When i try to get the  role details </p>
  
  <pre><code>aws --profile role-B sts get-caller-identity
  </code></pre>
  
  <p>I am getting the following error </p>
  
  <p><em>An error occurred (AccessDenied) when calling the AssumeRole operation: User: arn:aws:iam::&lt;>:user/&lt;> is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::&lt;>:role/ics-role</em></p>