Create the lambda function for image classification

Then, we'll create the lambda function that downloads images from S3 and inferences with TensorFlow Lite.

  1. Click "Functions" in the sidebar of the Lambda console.

2. Click "Create function".

3. Choose "Author from scatch". Fill all the following attributes and click "Create function":

  • "Function name": "image-classification"

  • "Runtime": "Python 3.9"

  • "Permissions": click "Change default execution role". Choose "Use an existing role" and select "LabRole".

4. Then it will jump to the page of "image-classification".

5. Finish the following 2 steps. [Step 1] Create a bucket in S3 for uploading the two files below. The bucket should be named as "cslab-resources-{your_student_id}". For details about bucket creation and file uploading, refer to Section 2 and Section 7 of this lab, respectively.

[Step 2] Go back to the page of "image-classification". Enter the following code in "Function code" with a replacement of {your_student_id}:

6. Click "Deploy" to deploy the code to the platform.

Last updated

Was this helpful?