Skip to content
Examples of using Lambda and IronWorker to do the same thing.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
CreateThumbnail.js
CreateThumbnailIron.js
README.md
helloworld-input.txt
helloworld-iron.js
helloworld.js
helloworld.worker
thumbnail-input.txt
thumbnail.worker

README.md

This is example code for blog post comparing AWS Lambda to IronWorker.

TODO: LINK TO POST

The post has information on testing out the helloworld example. This README will show you how to run the CreateThumbnail example which is part of the AWS Walkthrough #2.

AWS Walkthrough #2 uses S3’s event actions to call a Lambda function, you can accomplish the same thing using IronWorker’s webhook endpoint to start an IronWorker when an s3 event occurs.

CreateThumbnail Example

Follow the instructions here to try the Lambda version: http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-s3-events-adminuser.html

To run the exact same thing on IronWorker, do the following:

  1. Either clone this directory or copy CreateThumbnailIron.js and thumbnail.worker
  2. Create a node_modules directory (if you don't already have it from the AWS walkthrough)
  3. Run npm install async gm aws-sdk
  4. iron_worker upload thumbnail
  5. iron_worker queue --payload-file thumbnail-input.txt thumbnail
  6. Check HUD to see that it worked.
  7. Setup S3 Notifications to hit the thumbnail worker webhook endpoint: http://dev.iron.io/worker/reference/api/#queue_a_task_from_a_webhook

TODO: put AWS credentials in config file and use it like so: http://docs.aws.amazon.com/AWSRubySDK/latest/AWS.html#config-class_method

You can’t perform that action at this time.