---
title: Deployment rollback
source: https://docs.newrelic.com/docs/workflow-automation/workflow-examples/advanced/deployment-rollback
---

Monitor New Relic entity health and trigger rollback notifications via AWS SQS or HTTP webhooks when issues detected.

**Requirements:**

-   New Relic entity monitoring
-   (Optional) AWS SQS queue or HTTP webhook endpoint

**What this workflow does:**

-   Monitor entity alert severity for specified duration (default 30 minutes)
-   Check entity health every minute
-   Log unhealthy status if entity becomes CRITICAL or WARNING
-   Send AWS SQS rollback notifications (if configured) with entity details
-   Send HTTP webhook rollback notifications (if configured)
-   Log success if entity remains healthy for full duration
-   Stop monitoring if entity not found

**Key actions**: `newrelic.nerdgraph.execute`, `newrelic.ingest.sendLogs`, `aws.execute.api`, `(sqs.send_message)`, `http.post`

## Related topics [#related-topics]

[EC2 management](https://docs.newrelic.com/docs/workflow-automation/workflow-examples/advanced/ec2-management)

Automate infrastructure changes with workflows

[API gateway rollback](https://docs.newrelic.com/docs/workflow-automation/workflow-examples/advanced/api-gateway-rollback)

Roll back API Gateway deployments

[NRQL actions](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/newrelic/newrelic-nrdb)

Query deployment data with NRQL
