AWS Lambda function that implements an Alexa skill handler for smart-zoneminder.
- index.js - source code.
- config.json - main configuration file.
- mkzip - script to zip files for uploading to AWS Lambda.
- package.json - npm package file.
Using the AWS IAM Console create an IAM Role containing the "AmazonS3FullAccess", "DynamoDBFullAccess" and "AWSLambdaBasicExecutionRole" permissions.
- Clone this git repo to local machine running smart-zoneminder and cd to it.
- Run
npm install
to fetch dependencies. - Modify config.json per your installation.
- Create a file called creds.json with the following content modified to match your installation.
{
"alexaAppId": "AlexaSkillARN",
"host": "ApacheServerURI",
"port": "ApacheServerPort",
"cgiUser": "UserNameForCGIAccess",
"cgiPass": "PasswordForCGIAccess",
"alarmVideoPath": "URIToAlarmClipVideo",
"localPath": "URIToLocalAlarmImages"
}
- Run
mkzip
to zip up contents to prep for upload to AWS.
Using the AWS Lambda Console, create a new Lambda Function called alexa-smart-zoneminder and upload the zip file created above.
Ensure that the function uses your newly created IAM Role.
Tip: Use the "blank function" blueprint and skip the "configure triggers" prompt when creating the function.