Create Lambda functions using Ground Truth templates
You can create a Lambda function using the Lambda console, the AWS CLI, or an AWS SDK in a supported programming language of your choice. Use the AWS Lambda Developer Guide to learn more about each of these options:
-
To learn how to create a Lambda function using the console, see Create a Lambda function with the console.
-
To learn how to create a Lambda function using the AWS CLI, see Using AWS Lambda with the AWS Command Line Interface.
-
Select the relevant section in the table of contents to learn more about working with Lambda in the language of your choice. For example, select Working with Python to learn more about using Lambda with the AWS SDK for Python (Boto3).
Ground Truth provides pre-annotation and post-annotation templates through an AWS Serverless Application Repository (SAR) recipe. Use the following procedure to select the Ground Truth recipe in the Lambda console.
Use the Ground Truth SAR recipe to create pre-annotation and post-annotation Lambda functions:
-
Open the Functions page
on the Lambda console. -
Select Create function.
-
Select Browse serverless app repository.
-
In the search text box, enter aws-sagemaker-ground-truth-recipe and select that app.
-
Select Deploy. The app may take a couple of minutes to deploy.
Once the app deploys, two functions appear in the Functions section of the Lambda console:
serverlessrepo-aws-sagema-GtRecipePreHumanTaskFunc-
and<id>
serverlessrepo-aws-sagema-GtRecipeAnnotationConsol-
.<id>
-
Select one of these functions and add your custom logic in the Code section.
-
When you are finished making changes, select Deploy to deploy them.