This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var zip = require('gulp-zip'); | |
var del = require('del'); | |
var install = require('gulp-install'); | |
var runSequence = require('run-sequence'); | |
var awsLambda = require("node-aws-lambda"); | |
gulp.task('clean', function(cb) { | |
del(['./dist', './dist.zip'], cb); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Loading event'); | |
var DOWNLOAD_QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/445506728970/download'; | |
var PROCESS_QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/445506728970/process'; | |
var AWS = require('aws-sdk'); | |
var sqs = new AWS.SQS({region : 'us-east-1'}); | |
var http = require('https'); | |
exports.handler = function(event, context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var querystring = require('querystring'); | |
var https = require('https'); | |
var aws = require('aws-sdk'); | |
var s3 = new aws.S3(); | |
var sns = new aws.SNS({ | |
region: 'us-east-1' | |
}); | |
var query = '#SEARCH TERM HERE'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async'); | |
var request = require('request'); | |
// The API credentials of your service. These are needed to call Authlete | |
// Web APIs. | |
var api_key = '{Your-Service-API-Key}'; | |
var api_secret = '{Your-Service-API-Secret}'; | |
// A function to call Authlete's introspection API. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Loading event'); | |
// Twilio Credentials | |
var accountSid = ''; | |
var authToken = ''; | |
var fromNumber = ''; | |
var https = require('https'); | |
var queryString = require('querystring'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AWS from 'aws-sdk'; | |
import Promise from 'promise'; | |
import util from 'util'; | |
const s3 = new AWS.S3(); | |
const bucket = process.env.BUCKET; | |
const lambdaArn = process.env.LAMBDA_FUNCTION_ARN; | |
const xtensions = ['jpg', 'jpeg', 'png', 'mov', 'eps']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"lambda": { | |
"envVars": [], | |
"deploy": true, | |
"package": { | |
"optimize": { | |
"builder": "browserify", | |
"minify": true, | |
"ignore": [], | |
"exclude": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var AWS = require('aws-sdk'); | |
exports.handler = function(event, context) { | |
var bucket = event.Records[0].s3.bucket.name; | |
var key = event.Records[0].s3.object.key; | |
console.log("bucket : " + bucket + ", key : " + key); | |
var monitorTime = parseInt(key.split("-")[1]); | |
var currentTime = new Date().getTime(); | |
var s3 = new AWS.S3({region: 'us-west-2'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define libraries you would need | |
var oauth = require('oauth') | |
// define your OAuth-application credentials | |
var twitterConsumerKey = 'xxxxxxxxxxxxxxxxxxxx' | |
var twitterConsumerSecret = 'xxxxxxxxxxxxxxxxxxxx' | |
var api = new oauth.OAuth( | |
'https://twitter.com/oauth/request_token', | |
'https://twitter.com/oauth/access_token', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require('aws-sdk'); | |
var swf = new AWS.SWF(); | |
exports.handler = function(event, context) { | |
console.log('Loop started !', JSON.stringify(event, null, 2) ); | |
function callMySelfAndQuit() { | |
var lambda = new AWS.Lambda(); | |
lambda.invoke({ |