1 Answer
- Newest
- Most votes
- Most comments
0
The CloudWatch alarm embeds a Json payload in the context when sending the SNS notification, which is automatically extracted to the event variable of the Lambda - did you try reading that information? You should get the alarm name from it at the very least. For example, if you take a look at the following blog post (https://aws.amazon.com/blogs/mt/customize-amazon-cloudwatch-alarm-notifications-to-your-local-time-zone-part-1), you'll see that you can get the alarm name with alarmName=event['detail']['alarmName']
Likewise, you can get from event['detail'] the alarm configuration, which will give you extra information that you may need/want?
answered 9 months ago
Relevant content
- Accepted Answerasked 4 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 months ago
Side note: Why do you want to go through all of these steps you have to manually create instead of just using a scaling policy on the ASG?