Reputation: 4483
I am creating a Java repo, that can host multiple Lambda functions serving different needs.
I would like to package them into different jars, one jar per lambda, instead of one single jar for all of them. In this context, I have gone through a few articles:
But I did not understand exactly how can I achieve this.
Could anyone please help here? Thanks.
Upvotes: 0
Views: 722
Reputation: 10704
You can create multiple Java projects for each JAR you want to create. Each project will use the Lambda run-time API to create the Lambda function. Then upload each JAR by using the Lambda console. To learn how to create a Java project to build a JAR using Maven, see this AWS tutorial: https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2/usecases/creating_workflows_stepfunctions
The above tutorial shows you how to develop Lambda function by using the Lambda runtime API and an IntelliJ project. Then it shows you how to use Maven to create the JAR. Finally shows you how to deploy the JAR.
Upvotes: 1