Lambda function for getting latest_update_time page and number_updates for last month
pip install virtualenv
virtualenv ~/.virtualenvs/lambda
source ~/.virtualenvs/lambda/bin/activate
pip install -r requirements.txt
Setup npm dependencies:
npm install
The Serverless Framework project depends on a few plugins defined in package.json
sls invoke local -f main --data '{"queryStringParameters": {"title": <title>}}' `title` -- it could be arbitrary Wikipedia page title
Setting up credentials for AWS and using them with Serverless. documentation
Before deploy run pytest
localy
sls deploy
AWS - Deploy Function
sls invoke -f main --data '{"queryStringParameters": {"title": <title>}}' `title` -- it could be arbitrary Wikipedia page title
Files generated by this Lambda Function will be uploaded to default BUCKET_NAME -- 'getupsidewiki'
file name fromat <title>
for example London.json
file content:
{"number_updates_last_month": "0000", "latest_update_time": "2019-00-00T00:00:00"}