Created
October 24, 2017 21:23
-
-
Save mikebroberts/8a02d27155d8e91f9b44a8dd356fcca7 to your computer and use it in GitHub Desktop.
Java AWS Lambda to log inbound event - useful when you don't know what structure an event has
This file contains hidden or 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 io.symphonia; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
public class WhatIsMyLambdaEvent { | |
public void handler(InputStream is, OutputStream os) { | |
java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A"); | |
System.out.println(s.hasNext() ? s.next() : "No input detected"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment