I have images hosted on amazons3 server.my client wants to process the images using amazon lambda function. I have followed the example: http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-s3-events-adminuser-create-test-function-create-function.html
It is fine for resizing. But I want overlay and watermarking for the images also.But not getting a way.I have tried with imagemagick[https://www.npmjs.com/package/gm] for it seems to take path as parameter and the s3 image path is not helping me. the obvious reason I think is that they can't be directly accessed as the images paths in the directory.
Any suggestion on how to achieve this. I stuck for last 3 days but not able move forward.Thanks in advance for help!!!!
It looks like your are trying to do the overlaying in the size action. A quick check over at the gm repository on GitHub showed an issue with a possible solution. It seems as thought the composite action accepts a stream to read from. In regards to your code I would suggest a refactor to chain the actions together. I'm not sure I understand where the write stream is going in your original function though. Let me know if this helps!