> ## Documentation Index
> Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ERR_NGROK_AI_GATEWAY_PROVIDER_KEY_AWS_ROLE_DENIED: AWS refused to let ngrok assume the role in 'aws.roleArn'

> ERR_NGROK_AI_GATEWAY_PROVIDER_KEY_AWS_ROLE_DENIED: AWS refused to let ngrok assume the role in 'aws.roleArn'. Learn why ngrok returns this error and how to fix it.

## What does ERR\_NGROK\_AI\_GATEWAY\_PROVIDER\_KEY\_AWS\_ROLE\_DENIED mean?

ngrok returns ERR\_NGROK\_AI\_GATEWAY\_PROVIDER\_KEY\_AWS\_ROLE\_DENIED with this message:

```text theme={"theme":{"light":"css-variables","dark":"css-variables"}}
AWS refused to let ngrok assume the role in 'aws.roleArn'. The role must exist and trust ngrok's principal with the key's external ID.
```

> [!TIP]
>
> Troubleshoot ERR\_NGROK\_AI\_GATEWAY\_PROVIDER\_KEY\_AWS\_ROLE\_DENIED with your AI agent.
> Connect it to the [ngrok MCP server](https://ngrok.com/docs/mcp-server.md), then ask what caused the error and how to fix it.

## Where can I get more help with ERR\_NGROK\_AI\_GATEWAY\_PROVIDER\_KEY\_AWS\_ROLE\_DENIED?

Email [support@ngrok.com](mailto:support@ngrok.com?subject=Help%20with%20ERR_NGROK_AI_GATEWAY_PROVIDER_KEY_AWS_ROLE_DENIED) and include the error code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.