1

I want to trigger a Lambda function when my application port is down (application is running on Amazon EC2). So please let me know of any solution.

Thanks in advance.

Gayathri K
  • 139
  • 5
  • Are you simply wanting to check your website is up? You don't need to write any code for this, you can use a commercial uptime check type service (google for it) or use one of the AWS health checks - Route53 Health Check for example. – Tim Apr 04 '19 at 17:41

1 Answers1

1
  1. Run the Lambda periodically, e.g. every minute. Regardless whether the app works or not.
  2. From the Lambda check the app port
  3. If it decides the port is down do whatever you need to do. If the port is up simply exit.

Hope that helps :)

MLu
  • 24,849
  • 5
  • 59
  • 86