Created
March 14, 2017 15:45
-
-
Save mikebroberts/03fddcb20c1e4ddf4dd1baf2a1312af2 to your computer and use it in GitHub Desktop.
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 com.amazonaws.services.lambda.runtime.Context; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class ContextLambda { | |
public Map<String,Object> handler (Object input, Context context) { | |
Map<String, Object> toReturn = new HashMap<>(); | |
toReturn.put("getMemoryLimitInMB", context.getMemoryLimitInMB() + ""); | |
toReturn.put("getFunctionName",context.getFunctionName()); | |
toReturn.put("getFunctionVersion",context.getFunctionVersion()); | |
toReturn.put("getInvokedFunctionArn",context.getInvokedFunctionArn()); | |
toReturn.put("getAwsRequestId",context.getAwsRequestId()); | |
toReturn.put("getLogStreamName",context.getLogStreamName()); | |
toReturn.put("getLogGroupName",context.getLogGroupName()); | |
toReturn.put("getClientContext",context.getClientContext()); | |
toReturn.put("getIdentity",context.getIdentity()); | |
toReturn.put("getRemainingTimeInMillis",context.getRemainingTimeInMillis() + ""); | |
return toReturn; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment