File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ apply plugin : ' java'
2+
3+ repositories {
4+ mavenCentral()
5+ }
6+
7+ dependencies {
8+ compile(
9+ ' com.amazonaws:aws-lambda-java-core:1.1.0' ,
10+ ' com.amazonaws:aws-lambda-java-events:1.1.0'
11+ )
12+ }
13+
14+ task buildZip (type : Zip ) {
15+ baseName = ' java4lambda'
16+ from compileJava
17+ from processResources
18+ into(' lib' ) {
19+ from configurations. runtime
20+ }
21+ }
22+
23+ build. dependsOn buildZip
Original file line number Diff line number Diff line change 1+ package cwt .lambda ;
2+
3+ import com .amazonaws .services .lambda .runtime .Context ;
4+ import com .amazonaws .services .lambda .runtime .RequestHandler ;
5+
6+ /**
7+ * Basic string input, string output.
8+ * <p>
9+ * http://docs.aws.amazon.com/lambda/latest/dg/java-programming-model-req-resp.html
10+ */
11+ public class Hello implements RequestHandler <String , String > {
12+ @ Override
13+ public String handleRequest (String input , Context context ) {
14+ return String .format ("Hello %s." , input );
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments