1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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?
respondido hace 10 meses
Contenido relevante
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace 2 años
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?