cygni / cygni-competence-aws2-lamwatermark

Kompetensutveckling AWS, session 2: watermark på bilder som AWS Lambda-funktion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cygni AWS Kompetensutveckling 2017

Notes

The name of the watermark image is hardcoded in the add_watermark() function. You can add another image file into the project and change the code to reflect that, if you want.

Pre-setup

  1. Log in to AWS console, on the eu-central-1 region
  2. Setup IAM role 'lambda-with-s3' with AmazonS3FullAccess and CloudWatchLogsFullAccess (eller bara AWSLambdaFullAccess)
  3. Setup empty S3 bucket. Note the name.

Installation / Launch

  1. Create lambda function named "watermarker"
  2. IAM role: 'lambda-with-s3'
  3. Select event source S3 from list
  4. Tie trigger from S3 bucket created above for "ObjectCreated (All)" event type
  5. Set timeout 10 seconds, max memory 256 MB.
  6. Run npm install unless that's already up-to-date
  7. Run ./create-lambda-package.sh from project directory to create the deploy.zip file
  8. Upload zip file
  9. Enable event trigger

About

Kompetensutveckling AWS, session 2: watermark på bilder som AWS Lambda-funktion


Languages

Language:JavaScript 95.3%Language:Shell 4.7%