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
'use strict'; | |
const vandium = require( 'vandium' ); | |
// environment variables are set at this point since vanidum | |
// will load them from Parameter Store | |
exports.handler = vandium.scheduled( (event, context ) => { | |
console.log( 'ABC = ', proceass.env.ABC ); |
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
'use strict'; | |
require( 'vandium' ); | |
exports.handler = function( event, context, callback ) { | |
console.log( 'ABC = ', proceass.env.ABC ); | |
callback( null, 'ok' ); | |
}; |
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
Handler: index.js | |
Runtime: nodejs6.10 | |
CodeUri: 's3://my-code-bucket/my-function.zip' | |
Description: Creates thumbnails of uploaded images | |
MemorySize: 1024 | |
Timeout: 15 | |
Policies: | |
- AWSLambdaExecute # Managed Policy | |
- Version: '2012-10-17' # Policy Document | |
Statement: |
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
'use strict'; | |
var expect = require( 'chai' ).expect; | |
var LambdaTester = require( 'lambda-tester' ); | |
var myLambda = require( '../index' ); | |
describe( 'myLambda', function() { |
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
'use strict'; | |
var expect = require( 'chai' ).expect; | |
var myLambda = require( '../index' ); | |
describe( 'myLambda', function() { | |
[ | |
"Richard", |
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
‘use strict’; | |
exports.handler = function( event, context, callback ) { | |
if( (event.name === ‘Richard’) || (event.name === ‘rhyatt’ ) ) { | |
return callback( null, { valid: true } ); | |
} | |
callback( new Error( ‘unknown name’ ) ); |
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
'use strict'; | |
exports.handler = function( event, context, callback ) { | |
// Do something here | |
callback( null, 'success!' ); | |
}); |
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
'use strict'; | |
const vandium = require( 'vandium' ); | |
// our datastore | |
const db = require( './lib/db' ); | |
exports.handler = vandium.api() | |
.POST( { | |
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
'use strict'; | |
const vandium = require( 'vandium' ); | |
// our datastore | |
const db = require( './lib/db' ); | |
exports.handler = vandium.api() | |
.POST( { | |
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
'use strict'; | |
const vandium = require( 'vandium' ); | |
// our datastore | |
const db = require( './lib/db' ); | |
exports.handler = vandium.api() | |
.POST( (event) => { | |
NewerOlder