Check your website status with AWS Lambda.
- Sign up for AWS Lambda
- Install and configure the
aws
command-line client - Run
script/bootstrap
Sign up for AWS here.
The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month.
To install the aws
command-line client use pip
:
pip install awscli --upgrade --user
To configure aws
, follow these quick configuration steps.
Once configured, you should see config
and credentials
files in ~/.aws
.
script/bootstrap
script/pack_lambda .
script/push_lambda status package.zip
This will:
- Ensure the Lambda function role is created, with the correct policy attached
- Package the Lambda function and all its dependencies
- Create the Lambda function on AWS
Use the script/exec_lambda
script.
E.g. to check the status of https://github.com/
:
# Check status of github.com
script/exec_lambda status '{"url":"https://github.com/"}'
If all is well with your website, you should see:
{
"url": "https://github.com/",
"status_code": 200,
"message": "All is well",
"ok": true
}