はじめに Lambdaのプレビューも通ったので、S3にあげられた画像に透かしを付与するといったサンプルを作ってみました。 実装方針としては以下になります。 付与する透かしは、静的ファイルとして一緒にLambdaに配置する。 実際の処理部分は別ファイルとし、Lambda外からも呼べるようにする。 Lambda外から呼ぶテストコードを作成する。 透かし画像を作成 MacのペインティングソフトとしてFireAlpacaを用いて背景が透過な画像をpng形式で作成しました。 透かし付与 Lambdaには、imagemagickが含まれているとのことです。 AWS Lambda: How it Works - AWS Lambda また、node.js用のwrapperも含まれているようなのですが、こちらは画像合成の方法がなさそうでしたので、 node.js用のwrapperは別途 gmというwrap