Auto Scaling Group SNS Notifications not being sent
I've setup SNS notifications for my auto scaling group for all events. The SNS topic is configured to the following endpoints 1) Email in JSON format to me 2) A lambda function that sends the message to Microsoft Teams Webhook.
When the notification was initially setup from Auto Scaling Group's activity notifications page, I've received the test notification on both Email and Microsoft Teams, proving that the Lambda function had executed properly. However, when I tried increasing the desired capacity of the auto scaling group to test the notification as per the guidance of this AWS article, I did not receive any notifications even after verifying that the instance is running and passing all health checks. Consequently, when I triggered instance termination by decreasing the auto scaling group's desired capacity, I did not receive a notification on both email or Microsoft Teams.
Does anyone know why this is happening and how to troubleshoot?
I understand that you have setup Autoscaling Group (ASG) event notification, to monitor scaling activity, using SNS which has email and Lambda function subscription. Initial ASG SNS notification was working, but later tests done by increasing and decreasing ASG desired capacity did not work as expected, since you neither received email not Microsoft Teams (via Lambda) notification.
In order to troubleshoot this issue, first make sure that ASG notification is including event types Launch and Terminate. Please make sure from ASG Activity history that instance is created/terminated successfully. As per your description, I believe you have already verified up to this point.
Moving further, we can check whether ASG scaling event is actually triggering SNS notification. SNS CloudWatch metrics will provide information on NumberOfMessagesPublished, NumberOfNotificationsDelivered and NumberOfNotificationsFailed. If you do not see any data in NumberOfMessagesPublished, it indicates no message was published to SNS topic from ASG side. If you find NumberOfNotificationsFailed, that indicates possible issue with SNS delivery. For Lambda endpoint, you can also enable Delivery Status Logging, which provides further details on whether message delivery and possible reasons for delivery failure.
If you find that the issue is not identified with general troubleshooting discussed above, we will require details that are account-specific and non-public information. In that case, please open a support case with AWS using the link: https://docs.aws.amazon.com/awssupport/latest/user/case-management.html
Auto Scaling Group SNS Notifications not being sentasked 24 days ago
Auto Scaling Group stuck in "Updating Capacity"asked 2 years ago
Can we send email notifications from SNS using our own domain?Accepted Answerasked 2 months ago
Domain and Email Address Identity have different Feedback notification settings for different SNS topics but both of them go to the same topic as what is set for the domain identityasked 3 days ago
Why is Auto Scaling Group not taking Security Group from Launch Template?Accepted Answerasked 2 months ago
Is it possible to configure SNS email subject and body?asked 2 years ago
Why does the EC2 Auto Scaling Group automatically generate Scheduled Actions?Accepted Answerasked 6 months ago
Some of my domains set in SES didn't send notifications to my SNS topic.asked a year ago
SQS not receiving SNS messageasked 3 years ago
Sensing SNS email notifications from my domainasked 3 months ago