Cost - Generative AI Application Builder on AWS

Cost

With this AWS Solution, you pay only for the resources you use and there are no minimum fees or setup charges. Users pay for the dashboard used to launch Generative AI use cases and, and for any use cases that are deployed. The cost of deployed use cases depends on the configurations. Example configurations:

  1. A simple Deployment dashboard which costs approximately $20 USD per month.

  2. A simple production-ready chatbot use case deployed with default settings running in US East (N. Virginia), powered by Amazon Bedrock without access to documents, which also costs around $20 USD per month.

  3. A scaled system in an Amazon VPC use case that supports 8000 queries per day over tens of thousands of documents, which costs around $2000 USD per month. The cost of the use case will vary depending on the configuration, such as Text use cases with different model providers, with or without Retrieval Augmented Generation (RAG) enabled, and so on.

Workload description Estimated cost (USD/month)

Sample cost for Deployment dashboard

$20/month

Sample costs for a text-based proof of concept

(includes Deployment dashboard and 1 Text use case, ~100 interactions per day)

$40/month

Sample costs for a highly scalable generative AI query engine

(includes Deployment dashboard, 1 Text use case, and an Amazon Kendra Index for RAG upto 100K documents with ~8000 queries per day, with VPC enabled

$2000/month
Important

These examples are only intended to help you estimate the costs for your specific workloads. The use of different LLMs, configurations, or AWS services can change your costs (example, serverless/on-demand billing vs. provisioned/time-billed). To manage costs, we recommend creating a budget through  AWS Cost Explorer. Prices are subject to change. For full details, refer to the pricing webpage for each AWS service used in this solution.

Sample costs for running the Deployment dashboard only

The following table provides the cost breakdown for a Deployment dashboard with default parameters and 100 active users in the US East (N. Virginia) Region for one month, which will cost about $20/month.

AWS service Dimensions Cost [USD]
Amazon API Gateway, DynamoDB, Amazon CloudFront, Amazon S3, Lambda, AWS Systems Manager Parameter Store 5,000 512 KB REST API calls per month without caching enabled $1.97
Amazon Cognito 100 active users per month with advanced security features enabled and no users signing in through SAML or OIDC federation $5.55
AWS WAF 10,000 web requests across 1 web ACL and 7 defined rules without any rule groups $12.60
Total Deployment dashboard cost $20.12

Sample costs for a text-based proof of concept

A Deployment dashboard can have many use cases deployed at a given time. The following table shows the cost breakdown of a use case deployed without RAG for 1 business user performing 100 queries per day with the LLM. Queries are sent as a text message on the WebSocket and the response is streamed back as tokens with the assumption that streaming is enabled. With an Amazon Bedrock Titan Text Express model, the cost of running this use case is about $15/month.

AWS service Dimensions Cost [USD]
Amazon API Gateway (WebSocket), CloudFront, Lambda, Amazon S3, AWS Systems Manager Parameter Store 100 chat interactions per day. Average message size 32 KB per message and 5 minutes per connection. $0.61
Amazon CloudWatch 1.5 GB CloudWatch logs with verbose mode on for experimentation $7.23
Amazon DynamoDB

Conversation history table, 1 GB storage

LLM configuration table, 1 GB storage

$3.05
Sub total of costs (not including LLMs) $11.15
Amazon Bedrock (Titan Text Express)

Assumptions for 100 interactions per day:

  • Monthly cost for 150K input tokens per day = $3.60

  • Monthly cost for 16K output tokens per day = $0.768

$4.37
Total application cost with Amazon Bedrock (Titan Text Express) $11.15 (Use Case cost) + $4.37 (Amazon Bedrock cost) $15.52
Note

The costs of inference calls made to services outside the AWS network are not included in these estimates. See the pricing guide of your LLM provider if not using an AWS service.

Pricing guides for AWS services can be found at: Amazon Bedrock pricing and Amazon SageMaker pricing.

Sample costs for a highly scalable generative AI query engine

The following table provides the cost breakdown of a RAG-enabled use case with a Kendra index supporting 8000 interactions/day. With Amazon Bedrock’s Titan Text Express model as the LLM, this use case costs about $2000/month

AWS service Dimensions Cost [USD]
Amazon API Gateway (WebSocket) 8000 chat interactions per day. Average message size 32 KB per message and 5 minutes per connection. $38.89
Amazon CloudFront 240,000 requests per month with 100 GB data transferred out to the internet and 1 GB data transferred out to the origin $8.76
Amazon Bedrock (Titan Text Express)

Assumptions:

Input tokens = promptTemplate (400) + context (400)+ chatHistory (1080) + query Input tokens (20)= 1,900

Output tokens = 160 (average)

With 8,000 transactions a day,

monthly cost ($21.94 daily cost x 30) = $658.20 USD

$658.20
Amazon CloudWatch 24 metrics using 5 GB data ingested for logs and 1 dashboard $9.72
Amazon DynamoDB DynamoDB table to keep track of conversation history with each record up to 1 KB data, 8,000 read and writes per day $11.70
Amazon Kendra 0-8,000 queries a day and up to 100,000 documents with Amazon Kendra Enterprise Edition with 0-50 data sources $1,008.00
AWS Lambda

Container size - 128 MB, 512 MB ephemeral

storage, 2 Lambda functions used for authorization

Container size - 256 MB, 512 MB ephemeral storage, 5 requests per second with 20 seconds average compute time

$20.89
Amazon S3, AWS Secrets Manager, AWS Systems Manager Parameter Store 1 MB for storage of any use case artifacts $0.53
Total use case cost $1,756.29
Note
  • The costs of API calls made to any services outside of the AWS network are not included in these estimates. See the pricing guide of your LLM provider if not using Amazon Bedrock.

  • You can share the Amazon Kendra index between use cases, but this can drive up the number of queries per index. If this falls outside the Amazon Kendra Enterprise edition, additional charges­­ will apply.

Incremental cost of enabling Amazon VPC for a use case

The following table provides the cost breakdown of enabling Amazon VPC for a use case deployed in two AZs.

AWS service Dimensions Cost [USD]
Amazon NAT Gateway Assumption: 2 AZ deployment, with a NAT Gateway in each AZ. 100 GB of data processed through NAT Gateway 730 hours, 100 GB data processed per month $74.70
AWS PrivateLink (VPC Endpoints)

Assumptions: 2 AZ deployment, with 1 private subnet in each AZ and 1 VPC Endpoint with 2 elastic network interfaces (ENIs).

6 VPC endpoints, 2 ENIs per VPC endpoint, 730 hours with 1,024 GB data processed in a month

$97.84
Public IPv4 address

Assumption: 2 AZ deployment, 1 public subnet in each AZ with a NAT Gateway in each public subnet. Each NAT Gateway configured with 1 active public IPv4.

2 active public IPv4 address x 730 hours in a month x $0.005 hourly charge = $7.3 USD

$7.30

Additional cost

(for Amazon VPC)

$179.93