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 Answer
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
answered 2 years ago
  • No EC2 instance scale up and down. All applications are hosted on EC2 instances.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions

Relevant content