Hello World Lambda Function Java

+2 votes
Can anyone guide me through the steps for creating an AWS Lambda function to display Hello World using Java?

Thank you in advance.
Jan 16 in AWS by Anjali
• 2,930 points
318 views

1 answer to this question.

+1 vote
Best answer

You need to install AWS SDK Package in your eclipse:-

Refer to this question [How to download aws sdk in my eclipse?]for steps for doing this.

1. Now create a Lambda Project Using your Eclipse.

2. Create New Lambda Function and make few changes. Click on finish

3. This is the function created.

 

4. Click on build configure path. 

5. Select on JRE System Library.

6. Select JDK from Installed JRE and click on finish.

7. Apply and Apply and Close.

8. Select Run Configurations.

9. In Main Configure the following things.

10. You will get the message of BUILD SUCCESS.

11. Create a .jar file by right clicking on target and refresh and copy the path of the jar file.

12. Create a blank function. Select Java 8 as runtime.

13. Upload the jar file and mention handle test as follows:

14. Create a blank event with just { } and give it a name. Click on save and click on test. Your output will be displayed as such.

This way you successfully created a Lamdba Function printing Hello World using Java. 

answered Jan 16 by Nabarupa

selected Jan 16 by Priyaj

Related Questions In AWS

0 votes
0 answers
0 votes
1 answer

How to invoke the AWS lambda function from Java code

There are 2 methods in this class which should ...READ MORE

answered Feb 19 in AWS by Archana
• 5,560 points
640 views
0 votes
4 answers

Renaming AWS Lambda function

Nope- the function name is immutable READ MORE

answered Mar 6 in AWS by anonymous
3,078 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+3 votes
3 answers
0 votes
1 answer