Created
April 9, 2016 20:43
-
-
Save dalmat36/9027c5df3e8fc730bf7c4ea59e825f46 to your computer and use it in GitHub Desktop.
Hello AWS Lambda with Groovy
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
package testing | |
import com.amazonaws.services.lambda.runtime.Context | |
import org.bson.Document; | |
public class Hello { | |
public List<Document>; myHandler(People people, Context context) { | |
def listOfPeople = [] | |
Document person1 = new Document().append("name", people.person1) | |
listOfPeople.add(person1) | |
Document person2 = new Document().append("name", people.person2) | |
listOfPeople.add(person2) | |
Document person3 = new Document().append("name", people.person3) | |
listOfPeople.add(person3) | |
return listOfPeople | |
} | |
} |
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
{ | |
"person1":"Matt", | |
"person2":"Geoff", | |
"person3":"Max" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment