---
title: Troubleshoot the AWS DevOps Agent connection
source: https://docs.newrelic.com/docs/agentic-ai/autopilot/troubleshoot-aws-devops-agent-connection
---

> #### 💡 NOTE
>
> We're still working on this feature, but we'd love for you to try it out!
>
> This feature is currently provided as part of a preview program pursuant to our [pre-release policies](https://docs.newrelic.com/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy).

Use this page to diagnose errors when you connect Autopilot to the AWS DevOps Agent and to understand bearer token expiry.

## Errors during setup [#setup-errors]

If a setup step fails, New Relic shows one of these errors:

| Error            | Message in New Relic                  | Resolution                                                                                                                                |
| ---------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| 401 Unauthorized | Token is invalid, expired, or revoked | Issue a new bearer token at the Operator scope from IAM Identity Center, Amazon Cognito, or your IAM service account, and then try again. |
| 403 Forbidden    | Missing IAM permissions               | Check that you added all four required permissions to the IAM policy attached to the credential.                                          |
| 404 Not Found    | No agent spaces found                 | Verify that the AWS DevOps Agent is enabled and that the credential has access to at least one agent space.                               |
| 429 Rate Limited | Rate limit hit during discovery       | Wait 30 seconds, then try again.                                                                                                          |

## Token expiry [#token-expiry]

Bearer tokens expire after up to 60 days. These are the points where you see the expiry:

| When                                                     | Where it appears                                                                                                                         | Action                                                                                                                                                           |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| At expiry, during an investigation                       | A message in the active investigation thread: "AWS investigation paused — bearer token expired. Update token in Integrations to resume." | [Update the bearer token](https://docs.newrelic.com/docs/agentic-ai/autopilot/connect-to-aws-devops-agent#update-token), and then start the investigation again. |
| At investigation start, if the token has already expired | A "Token expired" status on the connection in the **Integrations** panel. New Relic also disables routing to the AWS DevOps Agent.       | [Update the bearer token](https://docs.newrelic.com/docs/agentic-ai/autopilot/connect-to-aws-devops-agent#update-token)                                          |

An investigation paused by an expired token doesn't resume automatically, so start it again. The AWS DevOps Agent treats an updated token as a new identity, so the AWS side loses any in-progress investigation tied to the previous token.

## Related articles [#related]

[Connect Autopilot to the AWS DevOps Agent](https://docs.newrelic.com/docs/agentic-ai/autopilot/connect-to-aws-devops-agent)
