A Sam-Packaged AWS Lambda client to the scanii.com content processing engine. For a detailed walk-through of deploying this application see: https://docs.scanii.com/article/151-how-do-i-analyze-content-stored-on-amazon-s3.
This is, essentially, a series of lambda functions packaged in a one-click deployable application that configures everything needed so your S3 objects are submitted automatically to scanii’s content analysis API. Once the content is processed, you can choose from a couple of different actions:
- Tag the content - this is defaulted to on and adds the following tag to objects processed:
ScaniiId
-> the resource id of the processed contentScaniiFindings
-> list of identified findings (content engine dependent)ScaniiContentType
-> the identified content type of the file processed
- Delete the object with findings - this is defaulted to off and will delete S3 objects with findings (such as malware or NSFW content) - for a full list of available content identification see https://support.scanii.com/article/20-content-detection-engines
The source code for this application is written using Javascript and requires, at least, nodejs 8 to run. Before getting started we strongly advise you to become familiar with the following technologies:
Tests utilize Mocha and are triggered into NPM, we provide a makefile to tie everything together:
$ make test
If you have the SAM CLI (https://github.com/awslabs/aws-sam-cli) installed locally you can run scanii-lambda locally for testing:
$ make run
You can deploy this application by clicking here. - please note that after deployment you must manually create a trigger event for the uvasoftware-scanii-lambda-submit
function for your S3 bucket, under “Add Triggers/S3” and event type Object Created (All)