Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prestonvanloon/lambda-watermark
AWS Lambda Watermark service for S3 images
https://github.com/prestonvanloon/lambda-watermark
aws lambda lambda-watermark watermark
Last synced: 23 days ago
JSON representation
AWS Lambda Watermark service for S3 images
- Host: GitHub
- URL: https://github.com/prestonvanloon/lambda-watermark
- Owner: prestonvanloon
- License: mit
- Created: 2015-07-08T02:18:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-09T19:09:33.000Z (about 9 years ago)
- Last Synced: 2024-10-04T12:53:02.426Z (about 1 month ago)
- Topics: aws, lambda, lambda-watermark, watermark
- Language: JavaScript
- Homepage:
- Size: 203 KB
- Stars: 26
- Watchers: 5
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lambda-watermark
[![Build Status](https://travis-ci.org/prestonvanloon/lambda-watermark.svg)](https://travis-ci.org/prestonvanloon/lambda-watermark)
[![Coverage Status](https://coveralls.io/repos/prestonvanloon/lambda-watermark/badge.svg?branch=master&service=github)](https://coveralls.io/github/prestonvanloon/lambda-watermark?branch=master)
[![dependencies](https://david-dm.org/prestonvanloon/lambda-watermark.svg)](https://david-dm.org/prestonvanloon/lambda-watermark)
[![Codacy Badge](https://www.codacy.com/project/badge/6d849756debb42198b492562991a5d01)](https://www.codacy.com/app/preston/lambda-watermark)Watermarking for images in [AWS S3](http://aws.amazon.com/s3/) using [AWS Lambda](http://aws.amazon.com/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.
## How to use
- `npm install lambda-watermark`
- Create your function (index.js)```javascript
'use strict';
var LambdaWatermark = require('lambda-watermark');var options = {
watermarkImagePath: './exampleWatermark.png',
relativeSize: 5,
opacity: 50
};exports.handler = function(event, context) {
new LambdaWatermark(options)(event, context);
};
```
- [Set up Lambda service on AWS](http://docs.aws.amazon.com/lambda/latest/dg/getting-started.html)
- Zip up your directory (index.js, watermark image, and node_modules) and upload to your AWS Lambda function## Configuration (options)
- `watermarkImagePath`: The relative path to your image
- `relativeSize`: 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)