![lambda website monitor lambda website monitor](https://brian.team/img/function-invocations-by-region.png)
For more information about configuring lambda-watchtower, check out the documentation. If you’re using lambda-watchtower, your test event could look something like the following snippet. In order to do that, click on the “Test” button and create a new test case with the parameters of your choice. AWS Lambda allows us to try our function with a test event. Let’s make sure everything is working according to plan. Alternatively, you can go with the one I’ve prepared for this guide! Simply get the contents of index.js from the lambda-watchtower GitHub repository and paste them into the text editor of the Lambda configuration page. You could create your own monitoring script - which would probably take you an hour or two. Now you should see the function configuration. Confirm by clicking on “Create function”. “Watchtower-ping”), select the Node.js runtime and pick the IAM role you’ve just created. Navigate to the AWS Lambda service from your AWS dashboard and click on “Create a function”. Now we’re ready to set up the monitoring script. “watchtower-role”) and complete the process with a click on “Create Role”. In our case, this is going to be Lambda.įinally, enter a role name (e.g. Next you need to select which service is going to use this role. Then select “Roles” in the left-hand menu and click on the “Create role” button. In order to create the new role, go to your AWS dashboard and select the IAM service. IAM Roles are AWS’s way of declaring permissions for accessing other services and resources. Creating an IAM Roleīefore we can get started, we need to set up an IAM Role. Thanks to this setup, monitoring multiple endpoints is super-reliable and costs next-to-nothing. Instead, we’re going to use it to keep logs for our custom HTTP(S) endpoints which don’t need to be hosted on AWS. CloudWatch is a service originally designed for monitoring EC2 instances. Lambda is Amazon’s serverless computing offer which allows you to perform one-off executions of small functions, and pay only for actual execution time. We are going to do this using two AWS services: AWS Lambda and AWS CloudWatch.
![lambda website monitor lambda website monitor](https://i.loli.net/2017/11/29/5a1e4afdd67c6.jpg)
This guide is going to walk you through setting up monitoring for one or several HTTP(S) endpoints.
![lambda website monitor lambda website monitor](https://www.derpturkey.com/content/images/2017/05/architecture.png)
Obviously, you don’t want to manually check in every hour to see if everything is still up and running. When you run a website, a web app or some other kind of service on the Internet, it is always a good idea to keep an eye on its availability and performance. (Original photo by David Marcu on Unsplash) A traveler watching monitoring stats on AWS CloudWatch.