I have a Lambda function that will be used to essentially curl a web address every minute. In order to do that I'm using the python Requests library. The problem I'm running into is how do I install the package on AWS like I'm able to do locally.
I came across Zappa and it looks to be what I need but I'm having issues configuring it. I went through the install steps for zappa, downloaded the aws-cli and setup the aws api credentials. This is the error message I'm getting -
$ zappa deploy production
Calling deploy for stage production..
Downloading and installing dependencies..
Packaging project as zip.
Error: Your app_function value is not a modular path. It needs to be in the format `your_module.your_app_object`.
In my zappa_settings.json -
{
"production": {
"app_function": "something",
"aws_region": "us-east-1",
"profile_name": "default",
"project_name": "something",
"runtime": "python2.7",
"s3_bucket": "company-lambda",
"lamda_handler": "app.lambda_handler"
}
}
In that directory I have -
- app.py
- zappa_settings.json
In app.py -
def lambda_handler(event, context):
print('hello')