Skip to content

Instantly share code, notes, and snippets.

@lewisdaly
Created May 16, 2018 06:07
Show Gist options
  • Save lewisdaly/76e9f10e7d66cc506c3f4dbbbab4bfb8 to your computer and use it in GitHub Desktop.
Save lewisdaly/76e9f10e7d66cc506c3f4dbbbab4bfb8 to your computer and use it in GitHub Desktop.
/*iota library */
const IOTA = require('iota.lib.js');
const { provider, functionName } = require('./config');
const iota = new IOTA({
provider,
});
/* set up AWS config to refer to our lambda */
const AWS = require('aws-sdk');
const lambda = new AWS.Lambda({
region: 'ap-southeast-2' //I come from a land down under
});
const IotaLambdaShim = require('iota-lambda-shim');
// Patch the current IOTA instance
IotaLambdaShim({iota, lambda, functionName});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment