# How to disable a Lambda SQS trigger

How-to guides · Updated 17 November 2026

**Short answer:** Disable the event source mapping: in the Lambda console open Configuration > Triggers, select the SQS trigger, Edit, clear Activate trigger and save; or run aws lambda update-event-source-mapping --uuid UUID --no-enabled. Lambda stops polling, messages stay in the queue, and they're processed when you enable it again, as long as they're still within the queue's retention period. Don't use reserved concurrency 0 for this; it can push messages to the dead-letter queue.

## Console steps

1. Open **Lambda > Functions > your function > Configuration > Triggers**.
2. Select the SQS trigger and choose **Edit**.
3. Clear **Activate trigger** and choose **Save**. The state moves from *Disabling* to *Disabled* after a short while.

You can also do this from the queue: **SQS > Queues > your queue > Lambda triggers** lists the mappings.

## CLI steps

```
# Find the mapping's UUID
aws lambda list-event-source-mappings --function-name process-orders \
  --query 'EventSourceMappings[].[UUID,EventSourceArn,State]' --output table

# Pause
aws lambda update-event-source-mapping --uuid 14e0db71-1234-4abc-9def-0123456789ab --no-enabled

# Confirm (Disabling -> Disabled)
aws lambda get-event-source-mapping --uuid 14e0db71-1234-4abc-9def-0123456789ab --query State

# Resume later
aws lambda update-event-source-mapping --uuid 14e0db71-1234-4abc-9def-0123456789ab --enabled
```

The mapping's `State` goes through `Disabling` to `Disabled`; enabling goes through `Enabling` to `Enabled`. While it's disabled, the function's `Invocations` metric for this source drops to zero and the queue's `ApproximateNumberOfMessagesVisible` starts to climb, which confirms that polling has stopped.

## What happens to messages

- **Waiting messages** stay in the queue and keep ageing. The queue's retention period (four days by default, up to 14) still applies; if the pause outlasts it, messages are deleted.
- **In-flight batches** already handed to the function finish normally; disabling isn't instantaneous.
- **Producers** are unaffected and keep sending, so watch the backlog: see [check SQS queue depth](https://cloudconsole.dev/how-to/check-sqs-queue-depth) and the oldest-message age.
- **Resume gently**: when you re-enable, Lambda scales up pollers and can hit a recovering downstream hard. Set *maximum concurrency* on the mapping (`--scaling-config MaximumConcurrency=5`) before re-enabling.

## Why not reserved concurrency 0?

Setting the function's reserved concurrency to 0 also stops processing, but for SQS the pollers keep receiving messages and the invocations are throttled. Each receive counts towards the queue's `maxReceiveCount`, so messages can be moved to the dead-letter queue even though your code never ran. Disabling the mapping avoids that. Reserved concurrency 0 is the right tool for stopping a function invoked by other sources; see [stop a Lambda function](https://cloudconsole.dev/how-to/stop-lambda-function).

If you need the function itself to stop for all sources at once, do both: disable the SQS mapping first, then throttle the function.

## Common mistakes

- **Deleting the trigger** instead of disabling it: you lose settings like batch size, filters and partial batch responses, and must recreate it.
- **Forgetting infrastructure code**: the next CloudFormation or Terraform deploy may set `Enabled: true` again.
- **Pausing the wrong mapping**: a function can have several SQS triggers; check the `EventSourceArn`.

## Questions

### How do I pause a Lambda SQS trigger?

Disable the event source mapping: clear Activate trigger in the console, or run aws lambda update-event-source-mapping --uuid UUID --no-enabled.

### Are SQS messages lost when I disable the Lambda trigger?

No, they stay in the queue until the trigger is enabled again, unless they exceed the queue's message retention period.

### Should I set reserved concurrency to 0 to stop an SQS-triggered Lambda?

It's better to disable the event source mapping. With concurrency 0, messages can be received and throttled repeatedly and end up in the dead-letter queue.

## When this happens away from your desk

Pausing a consumer is a common way to protect a struggling downstream during an incident. CloudConsole, a phone app for AWS, is being built to show queue depth, Lambda errors and alarms on your phone, so you can watch the backlog while it's paused.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Using Lambda with Amazon SQS](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html)
- [UpdateEventSourceMapping (Lambda API Reference)](https://docs.aws.amazon.com/lambda/latest/api/API_UpdateEventSourceMapping.html)

## Related

- [aws lambda update-event-source-mapping](https://cloudconsole.dev/cli/lambda-update-event-source-mapping)
- [How to check SQS queue size](https://cloudconsole.dev/how-to/check-sqs-queue-depth)
- [How to stop a Lambda function from running](https://cloudconsole.dev/how-to/stop-lambda-function)
- [How to redrive messages from an SQS dead-letter queue](https://cloudconsole.dev/how-to/redrive-sqs-dead-letter-queue)
- [Invalid request provided: Queue visibility timeout is less than Function timeout](https://cloudconsole.dev/errors/lambda-sqs-visibility-timeout-less-than-function-timeout)
- [How to add my IP to an AWS security group](https://cloudconsole.dev/how-to/add-my-ip-to-security-group)

---

Source: https://cloudconsole.dev/how-to/disable-lambda-sqs-trigger

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
