Tutorial by Examples

To deploy Java code to AWS Lambda, you have to create a distribution zip file that contains all dependencies that are needed during the runtime. Example project in Gradle: apply plugin: 'java' repositories { mavenCentral() } dependencies { compile 'com.amazonaws:aws-lambda-java-cor...
A lambda needs a handler, which will serve as the entry point to your application. Every handler needs to implement interface RequestHandler<I, O> where I is the input type and O is the output type. The input type is then passed to the handleRequest() method and the method returns the output t...
A lambda needs a handler, which will serve as the entry point to your application. In the simplest case, you get your input from the context and pass the result using the callback() function: exports.handler = (event, context, callback) => { callback(null, 'You sent ' + event.number); };
To create a Java lambda using the GUI, first make sure you have your distribution zip ready. You will also need an AWS account that can create lambdas. Switch to the AWS Lambda, dismiss the introduction screen (or read the Get Started documentation) and press the button Create a Lambda Function. ...
If you have successfully deployed the Lambda, you can also test it directly in the GUI. When you click the blue Test button for the first time, it presents you with a creation of a new test event. If you are testing the Java code from the Basic Lambda code in Java example, delete the whole body and...
Probably the most common way to invoke a Lambda is to use API Gateway, which maps a REST call to the lambda code. You can add multiple triggers to your Lambda during at any time, including when creating a new lambda. If you are familiar with API Gateway, you can associate any method with a deployed...

Page 1 of 1