How to watermark images uploaded into S3

Viewed 475

We would like to watermark images automatically, after its uploaded to S3. How do we achieve this using a java based library?

1 Answers

The flow should be as follows to watermark images whenever it is uploaded:

  1. Raw image (without watermark) is uploaded to S3 bucket
  2. Use S3 events (such as s3:ObjectCreated:* based on your need) to trigger Lambda. Hence, you need to configure S3 event destination as Lambda.
  3. Lambda shall apply watermark and upload watermarked image

NOTE: If you don't use Lambda, other way is via SQS/SNS as event destination, and your worker shall take request from it and apply watermarking.

Related