Invoke AWS CloudFormation Stack

0

I was able to create an alarm for EC2 via the CF template. It takes some parameters. How do I create the same for 100s of EC2 instances? How do I get the parameter values dynamically? I don't want to do it one by one.

1 Antwort
0

I don't think CF offers anything natively to handle dynamic creation of alarms for multiple instances. With the assumption that the EC2 instance scale up and down:

I would suggest using Event Bridge to notify when instances are created and trigger a Lambda function which would create the required cloudwatch alarms based on the event. The same process can be reversed when instances are scaling down. You can use SQS / SNS between Event Bridge and Lambda if you wish

--Syd

profile picture
Syd
beantwortet vor 2 Jahren
  • No EC2 instance scale up and down. All applications are hosted on EC2 instances.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen