Back to feed
Dev.to
Dev.to
7/22/2026
My Terraform Drift Alert Could Not Explain the Drift

My Terraform Drift Alert Could Not Explain the Drift

Short summary

The author upgrades a basic Terraform drift alert from a simple email notification to a structured event pipeline. Drift data is extracted via terraform show -json, filtered with jq, published to SNS, then fanned out to SQS for audit and Lambda for severity classification (HIGH/MEDIUM/LOW). The article includes Terraform configs, CLI commands, and a Python Lambda classifier, plus a debugging note about AWS region mismatches.

  • Converts terraform plan JSON into structured drift events with resource address, type, and actions
  • Fans out events to SQS for audit and Lambda for severity classification (HIGH/MEDIUM/LOW)
  • Includes practical debugging of an AWS CLI region mismatch causing NonExistentQueue errors

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more