Step 3: Processing with Amazon Lambda - Amazon SageMaker
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Step 3: Processing with Amazon Lambda

In this step, you learn how to create and specify the two types of Amazon Lambda functions that are required to create a custom labeling workflow:

  • Pre-annotation Lambda: This function initiates for and pre-processes each data object sent to your labeling job prior to sending it to workers.

  • Post-annotation Lambda: This function processes the results once workers submit a task. If you specify multiple workers per data object, this function may include logic to consolidate annotations.

If you are a new user of Lambda and Ground Truth, we recommend that you use the pages in this section as follows:

  1. First, review Pre-annotation and Post-annotation Lambda Function Requirements.

  2. Then, use the page Required Permissions To Use Amazon Lambda With Ground Truth to learn about security and permission requirements to use your pre-annotation and post-annotation Lambda functions in a Ground Truth custom labeling job.

  3. Next, you need to visit the Lambda console or use Lambda's APIs to create your functions. Use the section Create Lambda Functions for a Custom Labeling Workflow to learn how to create Lambda functions.

  4. To learn how to test your Lambda functions, see Test Pre-Annotation and Post-Annotation Lambda Functions.

  5. After you create pre-processing and post-processing Lambda functions, select them from the Lambda functions section that comes after the code editor for your custom HTML in the Ground Truth console. To learn how to use these functions in a CreateLabelingJob API request, see Create a Labeling Job (API).

For a custom labeling workflow tutorial that includes example pre-annotation and post-annotation Lambda functions, in the "Demo Template: Annotation of Images with crowd-bounding-box" document.