Measure your webpage real speed from multiple regions in a serverless way.
First, ensure that you have Serverless Framework installed. If not, install it:
$ npm install serverless -g
Clone the repo, install dependencies and deploy function:
$ git clone https://github.com/RafalWilinski/serverless-pagespeed-monitoring
$ npm install
$ serverless deploy
OR if you'd like to deploy to multiple regions at once, use:
$ ./deploy_global.sh
serverless-pagespeed-monitoring can be configured using config.yml
file:
metrics: <comma separated list of metrics e.g.: 'domInteractive,requestStart'>
url: <url to be tested e.g.: https://google.com>
rate: <cloudwatch schedule expression e.g.: rate(1 hour)>
After deploying, you can use CloudWatch Dashboard included in example_dashboard.json
to visualize data:
AWS_REGION=us-east-1 npm run local
MIT ยฉ Rafal Wilinski