- Zappa, Serverless Python Web Services for aws lambda.
- scrapy, a fast high-level web crawling & scraping framework for Python.
- Flask, A web microframework.
run
(env) ➜ lambda git:(master) ✗ virtualenv -p `which python` env
(env) ➜ lambda git:(master) ✗ source env/bin/activate
(env) ➜ lambda git:(master) ✗ pip install -r requirements.txt
dev
is defined in your zappa_settings.json.
(env) ➜ zappa deploy dev
(env) ➜ zappa update dev
(env) ➜ zappa tail
(env) ➜ zappa package dev
➜ ~ curl http://127.0.0.1:5000/
{
"message": "hello lambda!"
}
➜ ~ curl http://127.0.0.1:5000/fetch
{
"current": 2017073,
"deadline": "2017-03-21 19:56",
"deadts": 1490097360.0,
"name": "a163"
}
(env) ➜ scrapy crawl a163
Lambda function will not have local file write permissions everywhere on the machine. Try writing to the /tmp directory.