Skip to content

Commit 56f5cf3

Browse files
committed
Update readme
1 parent 96bd49f commit 56f5cf3

File tree

1 file changed

+95
-72
lines changed

1 file changed

+95
-72
lines changed

README.md

Lines changed: 95 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -9,100 +9,123 @@ AWS Bedrock is a fully managed generative AI service that simplifies building an
99

1010
## Key Features
1111

12-
### Multi-Model Architecture
13-
- Access to cutting-edge models like Amazon Titan, Anthropic's Claude, and AI21 Labs' Jurassic-2
14-
- Enables comparative model testing without vendor lock-in
15-
- Supports specialized model selection for specific tasks
16-
17-
### Agents for Complex Workflow Automation
18-
- Connect to internal APIs and Lambda functions
19-
- Auto-generate API call sequences for user requests
20-
- Maintain session context for conversational interactions
21-
22-
### Advanced Data Processing
23-
- Multimodal data processing (PDFs, images, audio/video)
24-
- Automated data extraction with customizable output templates
25-
- Confidence scoring to reduce hallucinations
26-
27-
### Enterprise-Grade Security
28-
- AWS IAM integration for granular access control
29-
- Private model customization with dedicated compute
30-
- Data encryption at rest and in transit
31-
- Compliance with HIPAA, GDPR, and SOC standards
32-
33-
## Requirements
34-
35-
| Name | Version |
36-
|------|---------|
37-
| Terraform | >= 0.13.0 |
38-
| AWS Provider | Latest Recommended Version |
12+
- Budget Management for AI Resource Consumption
13+
- Configurable Guardrails for Content Safety
14+
- Multiple Inference Profiles for Different AI Models
15+
- Flexible Tagging for Resource Management
3916

4017
## Usage Example
4118

4219
```hcl
43-
module "aws_bedrock" {
20+
module "bedrock" {
4421
source = "DNXLabs/bedrock/aws"
45-
46-
# Configure your Bedrock resources here
47-
# Example configurations will be added as the module develops
48-
}
49-
```
50-
51-
## Terraform Integration Strategies
5222
53-
### IAM Configuration
54-
```hcl
55-
resource "aws_iam_role" "bedrock_execution" {
56-
name = "bedrock-exec-role"
57-
58-
assume_role_policy = jsonencode({
59-
Version = "2012-10-17"
60-
Statement = [{
61-
Action = "sts:AssumeRole"
62-
Effect = "Allow"
63-
Principal = {
64-
Service = "bedrock.amazonaws.com"
23+
# Budget Configuration
24+
budget_email = "contact@example.com"
25+
budget = 500 # Monthly budget in USD
26+
27+
# Guardrails Configuration
28+
guardrails = [
29+
{
30+
name = "content-safety-guardrail"
31+
description = "Prevent inappropriate content"
32+
filter_strength = "MEDIUM"
33+
filters = ["SEXUAL", "VIOLENCE", "HATE", "INSULTS", "MISCONDUCT", "PROMPT_ATTACK"]
34+
tags = {
35+
"Unit" = "Cloud Operations Centre"
6536
}
66-
}]
67-
})
37+
}
38+
]
39+
40+
# Inference Profiles for Different Models
41+
profiles = [
42+
{
43+
name = "claude-3-5-sonnet-profile"
44+
description = "Claude 3.5 Sonnet Inference Profile"
45+
source_inference_model_name = "us.anthropic.claude-3-5-sonnet-20241022-v2:0"
46+
tags = {
47+
"Unit" = "Cloud Operations Centre"
48+
}
49+
},
50+
{
51+
name = "claude-3-7-sonnet-profile"
52+
description = "Claude 3.7 Sonnet Inference Profile"
53+
source_inference_model_name = "us.anthropic.claude-3-7-sonnet-20250219-v1:0"
54+
tags = {
55+
"Unit" = "Cloud Operations Centre"
56+
}
57+
}
58+
]
6859
}
69-
```
7060
71-
### Supporting Infrastructure
72-
```hcl
73-
# S3 Bucket for model training data
74-
resource "aws_s3_bucket" "model_data" {
75-
bucket = "bedrock-training-data-${var.env}"
61+
# Outputs
62+
output "profile_arns" {
63+
description = "ARNs of created Bedrock inference profiles"
64+
value = module.bedrock.profile_arns
65+
}
66+
67+
output "guardrail_arns" {
68+
description = "ARNs of created Bedrock guardrails"
69+
value = module.bedrock.guardrail_arns
7670
}
7771
78-
# Lambda function for custom model hooks
79-
resource "aws_lambda_function" "model_validation" {
80-
filename = "lambda.zip"
81-
function_name = "bedrock-model-validator"
82-
role = aws_iam_role.lambda_exec.arn
83-
handler = "index.handler"
84-
runtime = "python3.9"
72+
output "guardrail_versions" {
73+
description = "Versions of created Bedrock guardrails"
74+
value = module.bedrock.guardrail_versions
8575
}
8676
```
8777

88-
## Best Practices
89-
1. Use the latest version of the module
90-
2. Implement proper IAM roles and permissions
91-
3. Configure comprehensive logging and monitoring
92-
4. Manage model versions across environments
93-
5. Optimize costs with intelligent scaling policies
78+
<!--- BEGIN_TF_DOCS --->
79+
80+
## Requirements
81+
82+
| Name | Version |
83+
|------|---------|
84+
| Terraform | >= 0.13.0 |
85+
| AWS Provider | 6.0.0-beta1 |
9486

9587
## Inputs
9688

9789
| Name | Description | Type | Default | Required |
9890
|------|-------------|------|---------|:--------:|
99-
| (Inputs to be dynamically populated) | | | | |
91+
| `budget_email` | Email address to send budget alerts | `string` | n/a | yes |
92+
| `budget` | Monthly budget for AI resources in USD | `number` | n/a | yes |
93+
| `guardrails` | List of guardrail configurations | `list(object({...}))` | `[]` | no |
94+
| `profiles` | List of inference profile configurations | `list(object({...}))` | `[]` | no |
10095

10196
## Outputs
10297

103-
| Name | Description |
104-
|------|-------------|
105-
| (Outputs to be dynamically populated) | |
98+
| Name | Description | Type |
99+
|------|-------------|------|
100+
| `profile_arns` | List of created Bedrock inference profile ARNs | `list(string)` |
101+
| `guardrail_arns` | List of created Bedrock guardrail ARNs | `list(string)` |
102+
| `guardrail_versions` | Versions of created Bedrock guardrails | `list(string)` |
103+
104+
<!--- END_TF_DOCS --->
105+
106+
### Guardrails Configuration
107+
| Field | Description | Type |
108+
|-------|-------------|------|
109+
| `name` | Name of the guardrail | `string` |
110+
| `description` | Description of the guardrail | `string` |
111+
| `filter_strength` | Strength of content filtering (e.g., LOW, MEDIUM, HIGH) | `string` |
112+
| `filters` | Types of content to filter | `list(string)` |
113+
| `tags` | Optional tags for the guardrail | `map(string)` |
114+
115+
### Profiles Configuration
116+
| Field | Description | Type |
117+
|-------|-------------|------|
118+
| `name` | Name of the inference profile | `string` |
119+
| `description` | Description of the profile | `string` |
120+
| `source_inference_model_name` | ARN or name of the source model | `string` |
121+
| `tags` | Optional tags for the profile | `map(string)` |
122+
123+
## Best Practices
124+
1. Use comprehensive guardrails to ensure content safety
125+
2. Configure multiple inference profiles for flexibility
126+
3. Set appropriate budget alerts
127+
4. Use tags for better resource management and tracking
128+
5. Regularly review and update model configurations
106129

107130
## Contributing
108131

0 commit comments

Comments
 (0)