Skip to content

AWS Lambda Function to monitor a website's availability via HTTP/HTTPS

License

Notifications You must be signed in to change notification settings

chriselsen/AWSLambda_CloudPing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AWSLambda_CloudPing

AWS Lambda Function to monitor a website's availability via HTTP/HTTPS. This can be combined with VPC Endpoint for AWS Lambda to monitor the availability of an AWS Managed NAT Gateway.

It can also be used in combination with Amazon CloudWatch Alarms and Amazon Route 53 health checks that monitor CloudWatch alarms to react via Route 53 to internal endpoint failures.

Screenshot

Pre-Requisites:

  • Role for Lambda that allows put-metric access to Amazon CloudWatch

How-To:

  • Create AWS Lambda function
    • Name: LambdaPing
    • Description: Check availability of websites
    • Runtime: Node.js 4.3
    • Handler: index.handler
    • Timeout : 10 sec
    • Source: In file LambdaPing.nodejs
  • Configure AWS CloudWatch event rule as trigger
    • Schedule: Fixed rate of 1 minute
    • Function: Lambda Ping
    • Input: Constant (JSON text)
    • JSON: { "domain": "www.example.com", "protocol": "https", "port": "443", "path": "/web/index.html" }

Defaul Settings for JSON:

  • domain: example.com
  • protocol: https
  • port: 443
  • path: /
  • method: GET

About

AWS Lambda Function to monitor a website's availability via HTTP/HTTPS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published