aws-samples / amazon-cloudwatch-auto-alarms

Automatically create and configure Amazon CloudWatch alarms for EC2 instances, RDS, and AWS Lambda using tags for standard and custom CloudWatch Metrics.
MIT No Attribution
91 stars 85 forks source link

Is there a way to fire this manually for a running instance instead of stop/starting it? #11

Open vaughnd opened 3 years ago

vaughnd commented 3 years ago

This would be really useful to manually add to existing EC2 instances with less disruption.

eschu21 commented 3 years ago

Yeah I wonder if we could use a put/remove tag event in addition to the instance starting/stopping.

GnatorX commented 3 years ago

Not exactly for put/remove tag but this should be able to pick up any new instances you want to hook up

eschu21 commented 3 years ago

i set it up using put tags events using the following schema:


          "source": [
            "aws.tag"
          ],
          "detail-type": [
            "Tag Change on Resource"
          ],
          "detail": {
            "changed-tag-keys": [
              "Create_Auto_Alarms"
            ],
            "service": [
              "ec2"
            ],
            "resource-type": [
              "instance"
            ]
          }
        }
maxwell-ops-code commented 2 years ago

@eschu21 Hi, did this solution work for you, could you perhaps ellaborate on the steps you did to configure this?