简体   繁体   中英

Can we import our locally created lambda function to AWS console?

I have been working on AWS Lambda. For some reason, I had to create a Lambda function locally. I just want to know, can we import local lambda function to aws lambda console. If yes then please elaborate how can i achieve this?

Yes you can. Assume you create the Lambda function using the Java run-time API ( com.amazonaws.services.lambda.runtime.RequestHandler ) and you create a FAT JAR that contains all of the required dependencies. You can deploy the Lambda function (the JAR) using the AWS Management Console, as described in this AWS tutorial.

Creating an AWS Lambda function that detects images with Personal Protective Equipment

It is pretty easy:

  1. Write your lambda function with a lambda_handler
  2. Create a requirements.txt
  3. Install all the requirements in the same folder
  4. Package it(Zip file).
  5. Go to AWS Lambda --> Create function --> Fill all details --> Create function.
  6. Under code section: upload from -->.zip file ---> (select your file) --> upload--> save
  7. Modify the handler according to your function name.

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