---
title: beresp.iam_error
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/variables/backend-response/beresp-iam-error
---

**Type:** STRING  
**Access:** read-only

**Available in:** fetch, deliver, log

Because IAM authentication spans Fastly's signing layer and [AWS Security Token Service](https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html) (AWS STS), the error indicates which phase failed rather than the exact misconfiguration.

Errors fall into three phases:

| Phase  | Error text                    | Description                                                                                        |
| ------ | ----------------------------- | -------------------------------------------------------------------------------------------------- |
| Fastly | "Unsupported request method"  | Only GET and HEAD requests can be automatically signed.                                            |
| STS    | "IAM ExternalId mismatch"     | The trust policy's ExternalId did not match the one sent by Fastly.                                |
| STS    | "IAM configuration error"     | An AssumeRole parameter was invalid or the role was not found.                                     |
| STS    | "STS credential fetch failed" | Unknown error fetching credentials.                                                                |
| Fetch  | "IAM authorization denied"    | The request was signed, but AWS rejected it due to policy. The specific reason is not sent by AWS. |

See [backend declarations](https://www.fastly.com/documentation/reference/vcl/declarations/backend/) for IAM configuration properties.
