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

# Durable queues (SQS)

[Webhooks](/documentation/native-integrations/events/webhooks) are the default method for receiving real-time event notifications from Stigg. However, you can also request dedicated durable (AWS SQS) queues as an alternative delivery channel.

This option may be preferable for customers who need greater reliability, durability, or support for higher event volumes. If you’d like to explore this option, please contact [Stigg Support](mailto:support@stigg.io).

Once approved, we’ll provision a dedicated, secure SQS queue that Stigg will publish events to, using the same [event structure](/api-and-sdks/api-reference/webhooks/events) as webhooks.

<Note>
  Durable queues are available as part of the Stigg Scale plan. For more details, see [Stigg's pricing](https://www.stigg.io/pricing).
</Note>

# Getting temporary credentials

To access your provisioned SQS queue securely, you can request short‑lived AWS credentials via the Stigg Edge API. These credentials can be used to access the queue (e.g., read messages) without sharing long‑lived AWS keys.

Use cases:

* Poll or consume the customer’s provisioned SQS queue from a backend worker.
* Rotate access automatically by renewing short‑lived credentials.

## Endpoint

```bash theme={null}
GET https://edge.api.stigg.io/v1/credentials/event-queue.json?queueUrl=<queue-url>[&durationSeconds=<number>]
X-API-KEY: <api-key>
```

### Required header

* `X-API-KEY` — A full access key **or** a [scoped key](/api-and-sdks/api-reference/graphql/authentication) with the **Event Queue: Read** permission.

### Query parameters

* `queueUrl` (required): The SQS queue URL that was provisioned for the customer.
* `durationSeconds` (optional): Lifespan of the temporary credentials.
  * Range: 900-3600 seconds (15 minutes-1 hour)
  * Default: 3600 seconds (1 hour)

Stigg validates the combination of `queueUrl + account + environment`. The request must be made with a key that belongs to the same account/environment where the queue was provisioned.

### Example request (cURL)

```bash theme={null}
curl -X GET \
"https://edge.api.stigg.io/v1/credentials/event-queue.json?queueUrl=https%3A%2F%2Fsqs.eu-west-1.amazonaws.com%2F123456789012%2Fcustomer-events&durationSeconds=1800" \
-H "X-API-KEY: $STIGG_API_KEY"
```

<Note>
  `STIGG_API_KEY` can be either a full access key or a scoped key with the **Event Queue: Read** permission. Using a scoped key is recommended for environments with strict security requirements, as it limits the key's access to only what is needed.
</Note>

### Example response

```json theme={null}
{
"accessKeyId": "...",
"secretAccessKey": "...",
"sessionToken": "...",
"expiration": "2025-08-03T09:58:08.468Z"
}
```

* `accessKeyId`, `secretAccessKey`, and `sessionToken` are AWS STS session credentials.
* `expiration` is an ISO timestamp when the credentials become invalid. Renew before this time.

# Monitoring

Monitor your SQS dashboard for queue backlog, message age, and throughput metrics, and alert when backlog or message age breach your defined thresholds. Scale your consumers as needed to handle load spikes.


## Related topics

- [Webhooks](/documentation/native-integrations/events/webhooks.md)
- [Webhook events reference](/api-and-sdks/api-reference/webhooks/events.md)


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