The State of AWS Cost Optimization in India - Insights from 150+ Professionals on AWS Cost management
Get my free copy
AWS Cost Efficiency

Amazon Comprehend Pricing and Optimization

Expert Strategies to Optimize NLP Costs on AWS
Document

Did you know?

Amazon Comprehend can identify the language of text with high confidence, often above 99% for clear text, supporting over 100 languages. No manual language tagging needed!

Amazon Comprehend is a fully managed NLP service that helps extract insights from unstructured text using machine learning. While it's powerful for tasks like sentiment analysis, entity recognition, and text classification, costs can quickly add up without the right approach.

In this blog, we’ll explore Amazon Comprehend’s pricing structure and share practical tips to optimize usage and reduce costs, ensuring you get the most value from your NLP workloads.

Amazon Comprehend Pricing Overview

Amazon Comprehend offers a comprehensive and tiered pricing structure across its various natural language processing (NLP) services. 

Below is a detailed breakdown of the pricing for each Amazon Comprehend feature, including free tier offerings, usage-based rates, and charges for custom models and endpoints.

1.  Free Tier

Amazon Comprehend offers a generous free tier valid for 12 months from first use. Here's what's included:

Feature Free Monthly Limit
NLP APIs (e.g., Sentiment, PII, etc.) 50,000 units per API (5 million characters)
Topic Modeling 5 jobs, up to 1MB each
Custom Comprehend Not included in Free Tier (training/inference/hosting)

 2. Standard NLP APIs Pricing

Amazon Comprehend provides various natural language processing (NLP) features such as entity recognition, sentiment analysis, syntax analysis, and more. These are billed per 100-character unit, with a minimum of 3 units (300 characters) charged per request.

Feature Up to 10M Units 10M – 50M Units Over 50M Units
Key Phrase Extraction $0.0001 $0.00005 $0.000025
Sentiment Analysis $0.0001 $0.00005 $0.000025
Targeted Sentiment $0.0001 $0.00005 $0.000025
Entity Recognition $0.0001 $0.00005 $0.000025
Language Detection $0.0001 $0.00005 $0.000025
Event Detection $0.003 $0.0015 $0.00075
Syntax Analysis $0.00005 $0.000025 $0.0000125

3. PII Detection APIs Pricing

The PII detection APIs include two endpoints: one that checks if any PII exists, and another that locates and redacts PII in documents. Pricing is based on character units with a 300-character minimum per request.

Feature Up to 10M Units 10M – 50M Units 50M – 100M Units Over 100M Units
Detect PII $0.0001 $0.00005 $0.000025 $0.000005
Contains PII $0.000002 $0.000001 $0.0000005 $0.0000001

 4. Custom Comprehend Pricing

Custom Comprehend allows you to build and host your own custom classification or entity recognition models. Below is the pricing for model training, inference, and endpoint usage.

Feature Pricing Notes
Asynchronous Inference (PDF, Word, etc) $0.0005 per unit 1 unit = 100 characters, 3 unit minimum
Synchronous Inference (Endpoint) $0.0005 per IU per sec 1 IU = 100 characters/sec, min 60 sec per endpoint session
Model Training $3.00 per hour Billed by the second
Model Management $0.50 per month Per active custom model

5. Topic Modeling Pricing

Topic Modeling helps discover themes across a collection of documents. Pricing is based on total document size processed per job.

Usage Pricing
First 100 MB $1.00 flat rate/job
Above 100 MB $0.004 per MB

6. Trust and Safety Features Pricing

Amazon Comprehend also offers APIs to detect toxic content and unsafe input prompts. These follow standard character-based pricing.

Feature Price per Unit (100 characters) Minimum Charge
Toxicity Detection $0.0005 3 units (300 characters)
Prompt Safety Classification $0.0005 3 units (300 characters)

Strategies to reduce Amazon Comprehend costs 

1. Use Asynchronous Processing Instead of Real-Time Endpoints

Amazon Comprehend offers two primary ways to run inference on your text: real-time endpoints and asynchronous batch jobs. Real-time endpoints are ideal for applications that need immediate responses. However, they are continuously billed per second from the time you start them, regardless of whether they’re actively processing text or sitting idle. This can become very costly.

By contrast, asynchronous batch jobs are billed based only on the number of characters processed. They are a perfect fit for workloads that are predictable, non-urgent, or can be scheduled during off-peak hours. Since you’re not paying for uptime, but just for usage, you eliminate idle-time costs, which leads to significant cost savings.

Example scenario to demonstrate potential savings:

A media analytics company processes user reviews daily. They initially used Amazon Comprehend real-time endpoints, which ran 24/7, even when not actively analyzing data. They switched to asynchronous batch jobs to only pay for the actual volume of text processed.

Current Costs – Using Real-Time Endpoint

  • Endpoint type: 1 Inference Unit (IU)
  • Cost per second: $0.0005
  • Usage: 24/7 = 86,400 seconds/day
  • Monthly Usage: 86,400 × 30 = 2,592,000 seconds
  • Monthly Cost Calculation: 2,592,000 × $0.0005 = $1,296/month

Optimized Costs – Using Batch Processing

  • Daily text: 1 million characters
  • 1 unit = 100 characters → 10,000 units/day
  • Monthly Volume: 10,000 × 30 = 300,000 units
  • Cost per unit: $0.0001
  • Monthly Cost Calculation: 300,000 × $0.0001 = $30/month

Savings

  • Monthly Savings: $1,296 − $30 = $1,266
  • Annual Savings: $1,266 × 12 = $15,192

Using asynchronous batch jobs helped the company cut costs by over 97%, eliminating idle-time charges from real-time endpoints.

2.  Delete Idle Endpoints

Amazon Comprehend real-time endpoints are continuously billed as long as they are running, regardless of whether they are actively being used. If these endpoints are left running during idle periods such as nights, weekends, or holidays, they continue to incur charges, which can lead to unnecessary expenses. By identifying and deleting or stopping idle endpoints when they are not in use, organizations can avoid paying for unused compute time. Implementing automation to schedule shutdowns or setting alerts for idle usage can further enhance cost savings. 

This practice ensures that you only pay for resources when they are actively contributing to your workload, resulting in more efficient use of your budget.

Example scenario to demonstrate potential savings:

A media analytics company uses Amazon Comprehend’s real-time endpoints to analyze customer sentiment during business hours. However, they often forget to shut down endpoints over weekends, resulting in unnecessary costs for idle infrastructure. To address this, they implement a schedule to stop endpoints on Friday evenings and restart them on Monday mornings, avoiding charges when no analysis is being performed.

Current Costs – Idle Endpoint Left Running Over Weekends

  • Endpoint type: 1 Inference Unit (IU)
  • Cost per second: $0.0005
  • Idle time: 48 hours (Saturday and Sunday)
  • 48 hours = 48 × 3600 = 172,800 seconds
  • Weekend Cost Calculation:172,800 × $0.0005 = $86.40/weekend
  • Monthly Waste: 4 weekends × $86.40 = $345.60/month

Optimized Costs – Shutting Down During Idle Hours

  • Weekend Cost: $0 (no charges when endpoint is stopped)
  • Monthly Cost: $0 × 4 weekends = $0 for idle time

Savings

  • Monthly Savings: $345.60
  • Annual Savings: $345.60 × 12 = $4,147.20

By simply deleting or stopping idle Comprehend endpoints over weekends, the company eliminates over $4,000 in unnecessary annual charges without affecting weekday productivity.

3. Preprocess Text to Remove Unnecessary Characters

Preprocessing your text before sending it to Amazon Comprehend can significantly reduce costs. Many documents contain redundant or non-informative content such as HTML tags, repeated headers, disclaimers, and footers that do not add value to the analysis. Since Amazon Comprehend pricing is based on the number of characters processed, eliminating these unnecessary elements reduces the overall character count.

 By cleaning and optimizing the text data beforehand, you minimize the volume of content sent for analysis, which directly lowers your billing amount while maintaining the quality and relevance of insights derived.

How It Helps Save Costs

Suppose you are analyzing 10,000 documents each containing about 1,000 characters, including HTML, headers, and disclaimers. After preprocessing, each document reduces to 700 useful characters.

  • Before preprocessing: 10,000 documents × 1,000 characters = 10,000,000 characters
    Cost = 10,000,000 / 1000 × $0.0001 = $1,000
  • After preprocessing: 10,000 documents × 700 characters = 7,000,000 characters
    Cost = 7,000,000 / 1000 × $0.0001 = $700
  • Monthly Savings = $300
  • Annual Savings = $3,600

By simply cleaning your data before analysis, you reduce the processing size and save significantly on Amazon Comprehend costs.

4. Use Targeted Comprehend APIs Instead of General-Purpose Ones

Amazon Comprehend offers a variety of APIs tailored for specific Natural Language Processing (NLP) tasks, such as DetectSentiment, DetectEntities, and DetectSyntax. Each of these APIs is designed to perform distinct analyses on text data, and their pricing reflects the computational resources required for each operation.​

For instance, the DetectEntities API focuses on identifying and categorizing entities within the text, while the DetectSyntax API analyzes the syntactic structure of the text, which is a more computationally intensive task. Consequently, the cost per unit for DetectSyntax is higher than that for DetectEntities.​

Example Scenario:

Consider a situation where you need to process 1 million characters daily. Choosing the appropriate API can lead to significant cost differences:​

  • Using DetectEntities:
    • Units Processed: 1,000,000 characters / 1,000 characters per unit = 1,000 units​
    • Cost Calculation: 1,000 units × $0.0001 per unit = $100 per day​
  • Using DetectSyntax:
    • Units Processed: 1,000,000 characters / 1,000 characters per unit = 1,000 units​
    • Cost Calculation: 1,000 units × $0.00015 per unit = $150 per day​

By opting for the DetectEntities API over the DetectSyntax API, you can save $50 per day, amounting to approximately $1,500 per month, assuming 30 days of processing.​

This example illustrates the importance of selecting the most appropriate API for your specific use case to optimize costs.

5.  Optimize for Tiered Pricing Volumes

Amazon Comprehend offers tiered pricing, meaning the more text units you process in a month, the lower the per-unit cost becomes. This opens up an opportunity for cost optimization by consolidating workloads. Instead of spreading your NLP processing across multiple accounts or running small daily jobs, you can bundle large volumes of data and run analyses in bulk. For example, processing 9 million units at $0.0001 per unit would cost $900, but processing 11 million units takes advantage of the next pricing tier—where the first 10 million are charged at $0.0001 and the next 1 million at $0.00005—bringing the total to $1,000.50. This reduces your average cost per unit to around $0.00009095, which is cheaper than processing the smaller volume. 

This strategy works best for teams handling large-scale workloads, such as customer feedback analysis or document classification, where processing can be delayed or scheduled. 

Conclusion

Amazon Comprehend is a robust NLP tool, but its cost can scale rapidly without the right usage strategies. By switching from real-time endpoints to asynchronous jobs, deleting idle resources, preprocessing text, selecting the right APIs, and leveraging tiered pricing, organizations can achieve substantial cost savings. These optimizations not only ensure budget-friendly operations but also allow you to scale NLP workloads more effectively. Whether you’re building sentiment analysis pipelines or custom entity recognition models, cost awareness combined with smart planning can unlock the full potential of Amazon Comprehend—without overspending.

References

1. Amazon Comprehend Pricing

2. Amazon Comprehend Documentation

3. Custom Comprehend Overview

4. Amazon Comprehend Developer Guide – Endpoints

5. AWS Free Tier Details

Subscribed !
Your information has been submitted
Oops! Something went wrong while submitting the form.

Similar Blog Posts

Maintain Control and Curb Wasted Spend!

Strategical use of SCPs saves more cloud cost than one can imagine. Astuto does that for you!