Real-time analysis for custom classification (console) - Amazon Comprehend

Real-time analysis for custom classification (console)

You can use the Amazon Comprehend console to run real-time analysis using a custom classification model.

You create an endpoint to run the real-time analysis. An endpoint includes managed resources that makes your custom model available for real-time inference.

For information about provisioning endpoint throughput, and the associated costs, see Using Amazon Comprehend endpoints.

Creating an endpoint for custom classification

To create an endpoint (console)
  1. Sign in to the AWS Management Console and open the Amazon Comprehend console at

  2. From the left menu, choose Endpoints and choose the Create endpoint button. A Create endpoint screen opens.

  3. Give the endpoint a name. The name must be unique within the current Region and account.

  4. Choose a custom model that you want to attach the new endpoint to. From the dropdown, you can search by model name.


    You must create a model before you can attach an endpoint to it. If you don't have a model yet, see Training classification models.

  5. (Optional) to add a tag to the endpoint, enter a key-value pair under Tags and choose Add tag. To remove this pair before creating the endpoint, choose Remove tag

  6. Enter the number of inference units (IUs) to assign to the endpoint. Each unit represents a throughput of 100 characters per second for up to two documents per second. For information about endpoint throughput, see Using Amazon Comprehend endpoints.

  7. (Optional) If you are creating a new endpoint, you have the option to use the IU estimator. Depending on the throughput, or the number of characters you want to analyze per second, it can be hard to know how many inference units you need. This optional step can help you determine how the number of IUs to request.

  8. From the Purchase summary, review your estimated hourly, daily, and monthly endpoint cost.

  9. Select the check box if you understand that your account incurs charges for the endpoint from the time it starts until you delete it.

  10. Choose Create endpoint

Running real-time custom classification

Once you've created an endpoint, you can run real-time analysis using your custom model. There are two ways to run real-time analysis from the console. You can input text or upload a file, as shown in the following.

To run real-time analysis using a custom model (console)
  1. Sign in to the AWS Management Console and open the Amazon Comprehend console at

  2. From the left menu, choose Real-time analysis.

  3. Under Input type, choose Custom for Analysis type.

  4. Under Custom model type, choose Custom classification.

  5. For Endpoint, choose the endpoint that you want to use. This endpoint links to a specific custom model.

  6. To specify the input data for analysis, you can input text or upload a file.

    • To enter text:

      1. Choose Input text.

      2. Enter the text that you want to analyze.

    • To upload a file:

      1. Choose Upload file and enter the file name to upload.

      2. (Optional) Under Advanced read actions, you can override the default actions for text extraction. For details, see Setting text extraction options

    For best results, match the type of input to the classifier model type. The console displays a warning if you submit a native document to a plain-text model, or plain text to a native document model. For more information, see Training classification models.

  7. Choose Analyze. Amazon Comprehend analyzes the input data using your custom model. Amazon Comprehend displays the discovered classes, along with a confidence assessment for each class.