Setup pipeline for inference

Finally, we need to build our pipeline for image classification, including adding a trigger to call lambda function and specifying layer for lambda execution.

1. In Function overview section, click "Add trigger".

2. Select "S3" in the dropdown list.

3. Fill the following attributes and click "Add":

  • "Bucket": cslab-images-{your student id}

  • "Event type": "All object create events"

  • Tick the box of acknowledgement in "Recursive invocation"

4. Then the "Designer" should look like the following:

5. Go to "Code", scroll down, click "Layers". Then click "Add a layer".

6. Choose "Custom layers". Select "tf-lite" under "Custom layers" and the version number for "Version" (Your version number could be 1, it's ok). Click "Add".

7. Go to "Configuration" -> "Environment variables", click "Edit".

8. Click "Add environment variable".

9. Fill in the row with key "dynamodb_table_name" and value "classification_result" which is the name of the DynamoDB tables you created before. Click "Save".

10. Go to "Configuration" -> "General configuration", click "Edit".

11. Update "Memory" to 1024MB and "Timeout" to "1min". Then click "Save".

Last updated

Was this helpful?