• Home
  • Disclaimer
  • Contact
  • Archives
  • About
  • Subscribe
  • Support
  • Advertise

Kernel Talks

Unix, Linux, & Cloud!

  • How-to guides
    • Howto
    • Disk management
    • Configurations
    • Troubleshooting
  • OS
    • HPUX
    • Linux
  • Miscellaneous
    • Software & Tools
    • Cloud Services
    • System services
    • Virtualization
  • Certification Preparations
    • AWS Certified Solutions Architect – Associate
    • AWS Certified Solutions Architect – Professional
    • AWS Certified SysOps Administrator – Associate
    • AWS Certified Cloud Practitioner
    • Certified Kubernetes Administrator
    • Hashicorp Certified Terraform Associate
    • Oracle Cloud Infrastructure Foundations 2020 – Associate
  • Tips & Tricks
  • Linux commands
You are here: Home / Howto

Troubleshooting AWS cross-account IAM role access

Published: February 28, 2022 | Modified: February 28, 2022



Step by step rundown to troubleshoot AWS cross-account assume role issues.

Cross-account Assume role

AWS cross-account role access is one of the most common use cases in cloud environments and is always a headache to troubleshoot if one is not familiar enough with IAM. In this article, we will walk you through step by step procedure to drill down into the root cause of why AWS cross-account IAM role access is not working.

Typically, you will be seeing error messages like –

An error occurred (AccessDeniedException) when calling the xxx operation: User: arn:x....x is not authorized to perform xxx:xxx on resource arn:x....x because no resource-based policy allows the xxx:xxx action.

Let’s formalise the legends for a better understanding of the below steps:

  • account1 is the account from which role assume request is initiated
  • account2 is the account in which target role2 exists and IAM entity from account1 is trying to assume it.
  • IAM entity from account1 can be IAM user or role.

Consider below steps/points that will help you troubleshoot cross-account access issues.

  1. account1 IAM entity (user/role)should have permission sts:AssumeRole defined in IAM policy attached to it. If it has some condition attached to it, those conditions must be satisfied in the assume call.
  2. account2‘s IAM role role2 should have trust policy defined. This trust policy should trusts (principal field) the account1 or account1‘s IAM entity (user/role) which is initiating the assume call.
  3. If trust policy is having condition defined (condition field), then assume call should be satisfying those conditions.
  4. account2‘s IAM role must have permissions properly defined that account1’s IAM entity want to use in account2.

Or you can go through the below flow chart and drill down to the root cause of your problem!

⇠ Previous article
Setting up WSL for Sysadmin work
Next article ⇢
Coding GitHub action for automated CloudFormation template linting

Related stuff:

  • How to forward SSH key in Putty
  • How to establish passwordless ssh between two servers
  • Create nice text banner in HPUX
  • Run command on multiple linux servers from windows
  • How to remove product channels in Suse Manager
  • How to setup domain name in Linux server
  • Step by step procedure to take ignite tape backup in HPUX
  • Howto get Disk serial number in HPUX
  • How to add Cloundfront CDN in WordPress blog with SSL
  • Root disk mirroring in itanium HPUX
  • How to add UUID entry in /etc/fstab in Linux
  • How to find AWS resources that need to be tagged

Filed Under: Howto Tagged With: AWS cross account access, AWS IAM assume role issue, can not assume role

If you like my tutorials and if they helped you in any way, then

  • Consider buying me a cup of coffee via paypal!
  • Subscribe to our newsletter here!
  • Like KernelTalks Facebook page.
  • Follow us on Twitter.
  • Add our RSS feed to your feed reader.

Share Your Comments & Feedback: Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get fresh content from KernelTalks

  • Email
  • Facebook
  • RSS
  • Twitter

Get Linux & Unix stuff right into your mailbox. Subscribe now!

* indicates required

This work is licensed under a CC-BY-NC license · Privacy Policy
© Copyright 2016-2026 KernelTalks · All Rights Reserved.
The content is copyrighted to Shrikant Lavhate & can not be reproduced either online or offline without prior permission.