Watermarking for images in AWS S3 using AWS Lambda.
This module places a watermark in the bottom right corner of your image. An S3 Lambda event can be used to watermark every image that is uploaded to S3.
npm install lambda-watermark- Create your function (index.js)
'use strict';varLambdaWatermark=require('lambda-watermark');varoptions={watermarkImagePath: './exampleWatermark.png',relativeSize: 5,opacity: 50};exports.handler=function(event,context){newLambdaWatermark(options)(event,context);};- Set up Lambda service on AWS
- Zip up your directory (index.js, watermark image, and node_modules) and upload to your AWS Lambda function
watermarkImagePath: The relative path to your imagerelativeSize: The size of the watermark (percent relative to the parent image)opacity: How opaque the watermark should be. (100 is fully opaque, 0 is fully transparent)