Created
October 3, 2022 12:01
-
-
Save theawesomenayak/32f311bb2dbd697b53824ba770d659cc to your computer and use it in GitHub Desktop.
Serverless Handler
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
public ApiGatewayResponse handleRequest(Map<String, Object> input, Context context) { | |
LOG.info("received: {}", input); | |
Response responseBody = new Response("Go Serverless v1.x! Your function executed successfully!", input); | |
return ApiGatewayResponse.builder() | |
.setStatusCode(200) | |
.setObjectBody(responseBody) | |
.setHeaders(Collections.singletonMap("X-Powered-By", "AWS Lambda & serverless")) | |
.build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment