Skip to content

Commit 7828895

Browse files
committed
Readme pricing
1 parent 799a77e commit 7828895

File tree

1 file changed

+37
-38
lines changed

1 file changed

+37
-38
lines changed

README.md

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,41 @@ _You are responsible for the cost of the AWS services used while running this Gu
4242

4343
### Pricing
4444

45-
| AWS service | Dimensions | Cost [USD] |
46-
| ----------- | ------------ | ------------ |
47-
| [Amazon Amplify Hosting](https://aws.amazon.com/amplify/pricing/) | Build and deploy| $0.01 per minute|
48-
| | Data storage| $0.023 per GB per month|
49-
| | Data transfer out| $0.15 per GB served|
50-
| [Amazon Cognito User - Lite] (https://aws.amazon.com/cognito/pricing/) | Monthly active users (MAUs) | Up to 10k - Free|
51-
| [Amazon Bedrock - Amazon Nova Micro](https://aws.amazon.com/bedrock/pricing/| 1,000,000 input tokens | $ $0.000035 |
52-
| | 1,000,000 output tokens | $ $0.00014 |
53-
| [Amazon Bedrock - Anthropic Claude 3.5 Sonnet](https://aws.amazon.com/bedrock/pricing/| 1,000,000 input tokens | $ $0.003 |
54-
| | 1,000,000 output tokens | $ $$0.015 |
55-
| [Amazon API Gateway REST API](https://aws.amazon.com/api-gateway/pricing/) | First 333 million| $ 3.50|
56-
| [Amazon Lambda](https://aws.amazon.com/lambda/pricing) | First 6 Billion GB-seconds / month (x86) | $0.0000166667 for every GB-second , $0.20 per 1M requests |
57-
| [Amazon DynamoDB](https://aws.amazon.com/dynamodb/pricing/on-demand/) | Data Storage| First 25 GB stored per month - free, $0.25 per GB-month thereafter |
58-
| | Write Request Units (WRU)| $0.625 per million write request units |
59-
| | Read Request Units (RRU)| $0.125 per million read request units |
45+
Usage scenario:
46+
47+
- 10 users
48+
- Each user uses 10,000 tokens per day
49+
- Here is monthly cost breakdown for 30 days of usage
50+
51+
52+
| AWS Service | Assumptions| Calculation| Estimated Monthly Cost (USD)|
53+
| -----------| -----------| --------------| -------------------------------|
54+
| Amazon Bedrock (AI)| 10 users × 10,000 input tokens/day, equal output tokens| Input: (3,000,000 ÷ 1,000) × 0.003 = 9.00 Output: (3,000,000 ÷ 1,000) × 0.015 = 45.00| 9.00 + 45.00 = 54.00|
55+
| AWS Amplify| 5 GB data storage, 10 GB data transfer out per month| Storage: 5 × 0.023 = 0.115 Data transfer:| 10 × 0.15 = 1.50| 0.115 + 1.50 = 1.62|
56+
| Amazon Cognito| 10 monthly active users (free tier)| Free tier for MAUs up to 10,000| 0.00|
57+
| API Gateway| 10 users × 1,000 API requests/day | (300,000 ÷ 1,000,000) × 3.50 = 1.05| 1.05|
58+
| Lambda| 300,000 requests/month, no GB-second cost included| (300,000 ÷ 1,000,000) × 0.20 = 0.06| 0.06|
59+
| DynamoDB| 5 GB storage (within free tier), 1M writes, 2M reads| Writes: 1 × 0.625 = 0.625 Reads: 2 × 0.125 = 0.25 | 0.625 + 0.25 = 0.88|
60+
| Total Estimated Cost| 54.00 + 1.62 + 0.00 + 1.05 + 0.06 + 0.88| 57.61|
61+
62+
Refer for current pricing:
63+
- https://aws.amazon.com/amplify/pricing
64+
- https://aws.amazon.com/cognito/pricing
65+
- https://aws.amazon.com/bedrock/pricing
66+
- https://aws.amazon.com/api-gateway/pricing
67+
- https://aws.amazon.com/lambda/pricing
68+
- https://aws.amazon.com/dynamodb/pricing/on-demand
69+
70+
71+
6072

6173
## Prerequisites
6274

63-
1. Make sure you have [Python 3.9](https://www.python.org/) or greater installed on your local system. To install python and create virtual environment follow this article: https://repost.aws/knowledge-center/ec2-linux-python3-boto3 .
64-
2. Amazon Simple Storage Service (S3) bucket in same AWS account and AWS Region.
75+
[Python 3.9](https://www.python.org/) or greater
6576

6677
### AWS account requirements
6778
- You must have AWS account to deploy this solution.
68-
- [Amazon Simple Storage Service(S3) bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) to stage Lambda function dependency files.
79+
- [Amazon Simple Storage Service(S3) bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) to stage Lambda function files and Amazon CloudFormation stack.
6980
- In your AWS account, select your AWS Region and request access for Foundational Models _Amazon Nova Micro_ and _anthropic.claude-3.5-sonnet_ on Amazon Bedrock.
7081

7182
![Amazon Bedrock](images/Bedrock1.png)
@@ -87,24 +98,16 @@ _You are responsible for the cost of the AWS services used while running this Gu
8798
- Create a GitHub fine-grained access token for the new repository by following [this guide](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html). Refer section **Generate a personal access token in your GitHub account**.
8899

89100

90-
2. Download AWS CloudFormation template [guidance-for-genai-assistant.yaml](src/assets/guidance-for-genai-assistant.yaml) from the GitHub repository to your local system.
91-
92-
3. Create new [Amazon CloudFromation stack](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-create-stack.html) using above downloaded template.
101+
2. Download Amazon [Lambda function](src/assets/genai-assistant-lambda-function.zip) and [Amazon Lambda dependencies](src/assets/genai-assistant-backend_layer.zip) and upload to your Amazon S3 bucket in same AWS Region where you will deploy this solution.
102+
3. Download AWS CloudFormation template [guidance-for-genai-assistant.yaml](guidance-for-genai-assistant.yaml) from the GitHub repository to your local system. Update your Amazon S3 bucket name for Amazon Lambda function code and Lambda Layer.
93103

94-
![Amazon CloudFormation Output](images/CFN_Parameters.png)
95-
96-
4. Once CloudFormation stack deployoed successfully, navigate to output tab and note Amazon Lambda Function name.
97-
98-
![Amazon CloudFormation Lambda Function](images/CFN_output_LambdaFunction.png)
99-
100-
5. Now to build Amazon Lambda function dependencies, download [requirements.txt](src/assets/requirements.txt) and [create_lambda_dependencies.sh](src/assets/create_lambda_dependencies.sh) files in same folder on your local system. Run
104+
```json
105+
S3Bucket: <YOUR AMAZON S3 BUCKET NAME>
106+
```
101107

102-
```bash
103-
./create_lambda_dependencies.sh <your-Lambda-function-name> <your-S3-bucket-name>
104-
```
108+
4. Deploy updated CloudFormation template to deploy the solution.
105109

106-
Example:
107-
./create_lambda_dependencies.sh genai-assistant-function my-s3-bucket
110+
![Amazon CloudFormation Output](images/CFN_Parameters.png)
108111

109112

110113

@@ -132,10 +135,6 @@ If the build does not start automatically, trigger it through the Amplify consol
132135

133136
5. If you selected to run the frontend locally and connect to the deployed resources in AWS, use the CloudFormation stack outputs to verify deployed resources.
134137

135-
6. Navigate to Amazon Lambda console, open lambda function deployed and verify Lambda layer is attached to the function
136-
137-
![Amazon Lambda Layer](images/lambda_layer.png)
138-
139138

140139

141140
## Running the Guidance
@@ -223,4 +222,4 @@ This library is licensed under the MIT-0 License. See the LICENSE file.
223222

224223
## Contribution
225224

226-
This repository is intended for educational purposes and does not accept further contributions. Feel free to utilize and enhance the app based on your own requirements.
225+
This repository is intended for educational purposes and does not accept further contributions. Feel free to utilize and enhance the app based on your own requirements.

0 commit comments

Comments
 (0)