Skip to content

Instantly share code, notes, and snippets.

@adamstauffer
adamstauffer / cloudwatch2grafana.py
Created April 17, 2018 15:51
Convert AWS Cloudwatch metric alarms into Grafana graph panels with alerts
"""Generate Grafana graph panels from Cloudwatch Metric Alarms.
Meant for alarms that send SNS notifications. Only supports single
dimension Cloudwatch alarms.
"""
import json
import boto3
@adamstauffer
adamstauffer / delete_ecs_services.py
Last active February 26, 2020 07:55
Delete all services in an ECS cluster using boto3
"""Delete all services in an ECS Cluster using boto3.
Requires listing all services in a cluster, setting their desired tasks to 0,
then deleting the service.
"""
import boto3
CLUSTER_NAME = 'your-cluster-here'