简体   繁体   中英

What does the function name mean for and AWS Lambda function

I am building a Automobile Parts Catalog server using AWS lambda and DynamoDB, where i will have a number of API's for different requirements, like partsbyVehicle , partsByYear , partsByModel , but I see in Lambda console that it is asking for function name and then the jar.

I will have all the Java API's inside the jar file, but as function name of lambda I can provide only one name, I am confused for number of java API's, no. of Jar are required (each jar contains only 1 java API) with the 1 lambda function name, so in this way i need to upload multiple jars (each contains 1 java API), but what i want is that i will upload only one jar containing all the API's, but i don't understand the Lambda Function name which take only one name, Please help.

Thanks in Advance

Despite the poor wording of the question I think this is a pretty good question.

Each Lambda function has a single entry point (called the handler) which in Java is implemented as a public method in a class. For a Java Lambda function you will have to specify the package name and the class name that holds you lambda function and the name of the handler.

There can only be one handler/entry point for each Lambda function you create. So whenever a request triggers your lambda function, you would have to inspect the context to retrieve the URL, request verb etc. to determine which API is being requested by the caller. Then, in your Java class you could have a separate method for each API, or you might put those methods in different classes/packages.

I hope this is enough to get you unblocked and started on the right path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM