Skip to content

Instantly share code, notes, and snippets.

@willyg302
willyg302 / .lambda.yml
Last active May 15, 2016 09:43
Python hello world from Lambda
config:
FunctionName: lambda-python
Handler: index.handler
Runtime: nodejs
Description: Python hello world from Lambda
install: make
@willyg302
willyg302 / .lambda.yml
Last active August 11, 2023 06:39
A Lambda function for AES encryption/decryption, from a Gist!
config:
FunctionName: aws-lambda-aes-gist
Handler: index.handler
Runtime: nodejs
Description: A Lambda function for AES encryption/decryption, from a Gist!
install: npm install --production
/**
* config:
* FunctionName: hello-world
* Handler: hello-world.handler
* Runtime: nodejs
* Description: My awesome Hello World function!
*/
console.log('Loading event');
exports.handler = function(event, context) {
// fib(): Calculates the nth Fibonacci number.
// - n: The number to calculate
return function(n, a, b) {
return n > 0 ? arguments.callee(n - 1, b, a + b) : a;
}(n, 0, 1);
// add(): Adds two numbers.
// - a: The first number
// - b: The second number
return a + b;