Run the following code to confirm that you can make calls to the Amazon Rekognition Custom Labels API. The code lists
the projects in your AWS account, in the current AWS Region. If you haven't previously created a project,
the response is empty, but does confirm that you can call the DescribeProjects
operation.
In general, calling an example function requires an AWS SDK Rekognition client and any other required parameters. The AWS SDK client is declared in the main function.
If the code fails, check that the user that you use has the correct permissions. Also check the AWS Region that you using as Amazon Rekognition Custom Labels is not available in all AWS Regions.
To call an Amazon Rekognition Custom Labels operation
-
If you haven't already done so, install and configure the AWS CLI and the AWS SDKs. For more information, see Step 4: Set up the AWS CLI and AWS SDKs.
-
Use the following example code to view your projects.
Use the
describe-projects
command to list the projects in your account.aws rekognition describe-projects \ --profile custom-labels-access