Respond to New Relic CPU alerts, request Slack approval, and automate EC2 instance resizing via AWS Systems Manager.
Requirements:
- AWS credentials (EC2 + Systems Manager)
- New Relic alert condition
- Slack token
What this workflow does:
- Receive high CPU alerts from New Relic
- Retrieve alert details and identify impacted EC2 instance
- Send Slack notification with instance details and request approval
- Create SSM document after approval to automate resizing
- Stop instance, modify instance type, and restart
- Send progress updates to Slack during resizing
- Wait for completion and send status
- Clean up SSM document and send final confirmation
Key actions: newrelic.nerdgraph.execute, newrelic.nrdb.query, slack.chat.postMessage, slack.chat.getReactions, aws.systemsManager.writeDocument, aws.systemsManager.startAutomation, aws.systemsManager.waitForAutomationStatus, aws.systemsManager.deleteDocument, utils.datetime.fromEpoch, utils.uuid.generate
What's next
- API gateway rollback: API Gateway automation
- Deployment rollback: Deployment monitoring