Skip to content

AWS Lambda

Katarina1234 edited this page Feb 6, 2019 · 2 revisions

AWS Lambda - serverless compute service that automatically manages compute resources. It can run code ("Lambda function") in response to HTTP requests via Amazon API Gateway, among other events. A Lambda function is ready to run as soon as it's triggered.

Useful resources:

https://www.youtube.com/watch?v=fSUEk6iMW88&list=PLzvRQMJ9HDiSQMe68cti8cupI0mzLk1Gc&index=1
https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html

Example for nodejs

exports.myHandler = function(event, context, callback) {
   console.log("value1 = " + event.key1);
   console.log("value2 = " + event.key2);  
   callback(null, "some success message");
   // or 
   // callback("some error type"); 
}

Where
myHandler - This is the name of the function AWS Lambda invokes.
context - AWS Lambda uses this parameter to provide details of your Lambda function's execution.

callback(Error error, Object result);

In callback both parameters are optional. To indicate an error, error has to be passed in, not null.

Developer Documentation

Mockup

Database

API

User Management

React Native

Research

Clone this wiki locally