This is an AWS Lambda function importing files uploaded to S3 into Evernote. Each uploaded file will be embedded in a new note with the file name as title.
- An Evernote Developer token for your account
- An Unix environment with GNU make, Python 2.7, pip and a configured AWS CLI
- A S3 bucket with files to be uploaded
- An IAM managed policy called
s3-to-evernote
which grants access to the bucket
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "S3ObjectPermissions",
"Effect": "Allow",
"Action": [
"s3:DeleteObject",
"s3:GetObject",
"s3:PutObjectTagging"
],
"Resource": [
"arn:aws:s3:::REPLACE_WITH_BUCKET_NAME/*"
]
}
]
}
- Clone repo
- Set
EVERNOTE_DEV_TOKEN
in the Makefile, preferably encrypted with KMS to protect your token - Run
make
to build zip file - Run
make deploy
to create Lambda function in AWS account (needs configured AWS CLI) - Add an event trigger for created objects (Put) in the Lambda console for your S3 bucket
s3-to-evernote expects a certain prefix for uploaded files. You have to use the notebook name as a first path element. Tags are optional.
/NotebookName/Tag1/Tag2/TagN/Filename.ext
If you want imported files to be deleted on successful import into Evernote set the Lambda environment variable delete_imported_files
to 1.
This has been created to automatically import files scanned by a document scanner. Those devices quite often support CIFS shares, but not S3 nor Evernote directly. This can be combined with Synology's Cloud Sync to sync scanned files to S3 and use Lambda to trigger automatic workflows which Synology can't do natively. That is the main reason why notebook name and tag are delivered via a prefix and not via tags.