mapbox / streambot

DEPRECATED (SEE README) Robot-assisted deploys to Lambda
ISC License
39 stars 7 forks source link

"Bundling your code with streambot": how? #42

Closed tmcw closed 8 years ago

tmcw commented 8 years ago

"The Streambot stack" section of the documentation is good, and I can follow "Your service stack" but I get lost in this paragraph:

If your function has dependencies that include C++ addons precompiled via node-pre-gyp, you can use Streambot's bin/bundle script to bundle your code with dependencies for the correct platform/architecture to run on AWS Lambda, regardless of your native OS. Once you've bundled your function, you need to upload it to S3.

Do you use bin/bundle also if your code doesn't have dependencies?

Once you've uploaded your bundled function to S3, how does Streambot discover it?

rclark commented 8 years ago

Do you use bin/bundle also if your code doesn't have dependencies?

If you don't have c++ addons that use node-pre-gyp, you can just .zip your code and upload to S3. If you do, streambot's bundle function will make sure to pull binaries that will run on the platform Lambda will use.

Once you've uploaded your bundled function to S3, how does Streambot discover it?

When you create a Lambda function via API call or CloudFormation, you must specify the location of the bundle on S3.