Urgent.News

What's breaking now, across hundreds of outlets.

Tech

AssumeRole Access Denied? 7 Causes and How to Find Yours

Prefer video? The full walkthrough is at the top of this post, and the most common cases have one-minute Shorts right where they come up. This guide first went out on the AWS Cloud in a Minute newsletter . The one-minute answer The problem: your app, script or pipeline calls sts:AssumeRole , and AWS answers AccessDenied . The role exists, the ARN looks right, and someone says it worked last week.…

AssumeRole access denied is a common issue when an application, script or pipeline attempts to assume a role using AWS STS. The error occurs when AWS returns an AccessDenied response, even though the role exists and the ARN looks correct. This can happen for several reasons, outlined in the source material:

1. The role's trust policy does not list the caller as a trusted principal. AWS requires that the role's trust policy explicitly allows the caller's principal to assume the role. If the trust policy does not include the caller's ARN or principal type, the assume role request will be denied.

2. The role has been deleted and recreated. If a role is deleted and recreated with a new principal ID, the old trust policy referencing the old ID will no longer match. The trust policy must be updated with the new principal ID to allow assume role requests.

3. Conditions in the trust policy are not met. Trust policies can include conditions such as external IDs, MFA, source IP ranges, or organization IDs. If these conditions are not satisfied during the assume role request, the request will be denied. Check the trust policy's condition block and ensure that any required conditions are met by the caller.

4. Session tags or a source identity are used. If the assume role request includes session tags or a source identity, the trust policy must allow the sts:TagSession action, and the caller's policy must allow the sts:SetSourceIdentity action. These additional permissions are required to allow the assume role request when session tags or a source identity are used.

5. Guardrails block the request. AWS provides guardrails such as service control policies (SCPs), resource control policies (RCPs) and permissions boundaries to limit what actions can be performed. If any of these guardrails deny the assume role request, even if the trust policy and caller's policies allow it, the request will be denied.

To troubleshoot AssumeRole access denied issues, start by examining the error message, which indicates whether the problem is on the role's side or the caller's side. The error message will specify the policy that denied the request, such as the role's trust policy or the caller's identity-based policy. Then, follow the suggested checks in order, starting with the role's trust policy and moving to the caller's policies.

By systematically verifying each potential cause, you can identify and resolve the issue preventing the assume role request from succeeding.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

More from Sunday, 29 November 2026 →