RAD Modules

RAD Modules

  • GitHub

›Serverless functions

Documentation

  • Getting started

Security

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Keycloak integration
  • Advanced configuration
  • Attribute-based access control

Mailer

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Notifications

  • Notifications service
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Scheduler

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

PDF

  • Introduction
  • Getting started
  • Client
  • Api documentation
  • Advanced configuration

Serverless functions

  • Details
  • Create file
  • Get files
  • Delete file
  • Resize images
  • Watermark
  • RAD Security integration
  • Bitbucket pipelines

Admin panel

  • Introduction

Services communication

  • Communication between services

Changelog

  • Details

Watermark

Add watermark to images when image is upload to S3 (watermark function)

Watermark function works as lambda events

functions:
  watermark:
    handler: lambdas/watermark/handler.handle
    events:
      - s3:
          bucket: ${env:AWS_LAMBDA_S3_PUBLIC_BUCKET}
          event: s3:ObjectCreated:*
          existing: true

Configuration (.env file)

WATERMARK_OPTIONS=right:bottom:0.1
WATERMARK_FILENAME=watermark.png
WATERMARK_BUCKET=watermarkBucket

Available options:

  • WATERMARK_OPTIONS (position X:position Y: opacity):
    • Position X: left/center/right
    • Position Y: top/middle/bottom
    • watermark opacity: number from 0.1 to 1

Watermark image is downloaded from S3 so we need to define where it should be downloaded:

  • WATERMARK_FILENAME: file name key
  • WATERMARK_BUCKET: bucket name

This function adds watermark only to files that have "-original" (file-original.ext) postfix defined in name, and generated new file with watermark and name file-watermark.ext

← Resize imagesRAD Security integration →
  • Add watermark to images when image is upload to S3 (watermark function)
RAD Modules
Docs
Getting startedChangelogRAD Modules API Doc
Services
SecurityMailerNotificationsServerless functionsSchedulerPdf generatorAdmin panel
Support:
GitHubhello@tsh.io
Copyright © 2021 The Software House