How can we detect that AWS ElasticBeanstalk (EB) deployment failed?
When deployment fails, the EB environment is green and we think that everything is OK. But it's not. The app is not running.
If we go to logs /var/log/eb-docker/containers/eb-current-app/11170e07ae99-stdouterr.log
we can see that there is an error. How can we detect it so that we can send it to Slack or other tools?
Here's how to setup email notifications about "notable events" (which should include deployment errors): https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.sns.html
If prefer Slack notification, you can just use Slack's Email app