AWS infrastructure knowledge for HOLE Foundation (Bedrock AI services and future compute/storage)
Deploys AWS infrastructure for AI model access via Bedrock and serverless compute using Terraform
/plugin marketplace add The-HOLE-Foundation/claude-plugins/plugin install the-hole-foundation-hole-infrastructure-hole-infrastructure@The-HOLE-Foundation/claude-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
HOLE Foundation uses AWS primarily for AI model access via Bedrock with infrastructure ready for future compute and storage needs.
Terraform Workspace: aws-foundation-prod
Organization: theholetruth
Location: /Volumes/HOLE-RAID-DRIVE/Projects/hole-terraformer/terraform/aws/foundation/
AWS Account: 420073135340
Region: us-east-1 (primary)
Resources: ~5 (configured, ready for expansion)
Roles:
terraform-bedrock-foundation - Terraform execution role
File: terraform/aws/foundation/main.tf
Models Available:
claude-3-5-sonnet-20241022 - Fast, cost-effectiveclaude-3-opus-20250219 - Most capableclaude-3-haiku-20240307 - Fastest inferenceclaude-instant-1.2 - Legacy modelRegions: us-east-1 (primary), us-west-2 (backup)
File: terraform/aws/foundation/bedrock.tf
Configuration:
# Bedrock access is via IAM policies
# Models are invoked through bedrock:InvokeModel API
# No specific Terraform resources (on-demand model access)
Keys:
bedrock-key - Encryption for Bedrock dataalias/bedrock-foundationPurpose: Encrypt sensitive data used with Bedrock models
Serverless Compute:
Storage:
Other:
When user asks to deploy AWS infrastructure:
1. Navigate to workspace:
cd /Volumes/HOLE-RAID-DRIVE/Projects/hole-terraformer/terraform/aws/foundation
2. Load AWS credentials from dotenvx:
export AWS_ACCESS_KEY_ID=$(cd /Volumes/HOLE-RAID-DRIVE/dotenvx && dotenvx get AWS_ACCESS_KEY_ID)
export AWS_SECRET_ACCESS_KEY=$(cd /Volumes/HOLE-RAID-DRIVE/dotenvx && dotenvx get AWS_SECRET_ACCESS_KEY)
export TF_VAR_aws_access_key="$AWS_ACCESS_KEY_ID"
export TF_VAR_aws_secret_key="$AWS_SECRET_ACCESS_KEY"
3. Edit Terraform files:
4. Plan and apply:
terraform plan
terraform apply
User: "Create a Lambda function for AI processing"
Steps:
lambda/ai-processor.py)# Lambda function
resource "aws_lambda_function" "ai_processor" {
filename = "lambda/ai-processor.zip"
function_name = "ai-processor"
role = aws_iam_role.lambda_bedrock.arn
handler = "index.handler"
runtime = "python3.11"
environment {
variables = {
BEDROCK_MODEL = "claude-3-5-sonnet-20241022"
AWS_REGION = "us-east-1"
}
}
tags = {
Project = "HOLE Foundation"
}
}
# IAM role for Lambda
resource "aws_iam_role" "lambda_bedrock" {
name = "lambda-bedrock-access"
assume_role_policy = jsonencode({
Version = "2012-10-17"
Statement = [{
Action = "sts:AssumeRole"
Effect = "Allow"
Principal = {
Service = "lambda.amazonaws.com"
}
}]
})
}
# Bedrock access policy
resource "aws_iam_role_policy" "lambda_bedrock" {
name = "bedrock-access"
role = aws_iam_role.lambda_bedrock.id
policy = jsonencode({
Version = "2012-10-17"
Statement = [{
Effect = "Allow"
Action = [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
]
Resource = "*"
}]
})
}
User: "Create an S3 bucket for backups"
Template:
resource "aws_s3_bucket" "backups" {
bucket = "hole-foundation-backups-${var.aws_account_id}"
tags = {
Environment = "Production"
Purpose = "Backups"
}
}
# Enable versioning
resource "aws_s3_bucket_versioning" "backups" {
bucket = aws_s3_bucket.backups.id
versioning_configuration {
status = "Enabled"
}
}
# Enable encryption
resource "aws_s3_bucket_server_side_encryption_configuration" "backups" {
bucket = aws_s3_bucket.backups.id
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
kms_master_key_id = aws_kms_key.bedrock.arn
}
}
}
Bedrock is accessed via API (no Terraform resources to create):
# Example: Python Lambda using Bedrock
import boto3
bedrock = boto3.client('bedrock-runtime', region_name='us-east-1')
response = bedrock.invoke_model(
modelId='anthropic.claude-3-5-sonnet-20241022-v2:0',
body=json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
})
)
IAM permissions required: bedrock:InvokeModel
✅ AI model inference (Bedrock Claude, other models) ✅ Advanced serverless (Lambda with complex triggers) ✅ Large-scale storage (S3 for big files) ✅ NoSQL databases (DynamoDB) ✅ ML pipelines (SageMaker) ✅ Event-driven architectures (EventBridge, SQS, SNS) ✅ Container orchestration (ECS, EKS)
Pattern: Cloudflare Worker as API gateway to AWS Lambda/Bedrock
User Request
↓
Cloudflare Worker (edge)
↓
AWS Lambda (compute)
↓
Bedrock (AI inference)
↓
Lambda returns result
↓
Worker caches in KV
↓
Worker returns to user
Terraform Changes Required:
Benefits:
Pattern: AWS console access via Azure Entra ID
Azure Side: Entra ID → AWS IAM Identity Center integration AWS Side: IAM roles and permissions
Already configured - no changes needed unless adding new roles
Secrets:
AWS_ACCESS_KEY_ID - Access key IDAWS_SECRET_ACCESS_KEY - Secret access keyLoading:
cd /Volumes/HOLE-RAID-DRIVE/dotenvx
export AWS_ACCESS_KEY_ID=$(dotenvx get AWS_ACCESS_KEY_ID)
export AWS_SECRET_ACCESS_KEY=$(dotenvx get AWS_SECRET_ACCESS_KEY)
Terraform Variables:
export TF_VAR_aws_access_key="$AWS_ACCESS_KEY_ID"
export TF_VAR_aws_secret_key="$AWS_SECRET_ACCESS_KEY"
From Lambda: Uses Lambda execution role (IAM) From external: Uses AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY
Per-Token Pricing (approximate):
Best Practices:
Optimization: Use Cloudflare Workers for edge compute when possible (free tier more generous)
Account: 420073135340 Region: us-east-1 Workspace: aws-foundation-prod Location: terraform/aws/foundation/ Terraform Role: arn:aws:iam::420073135340:role/terraform-bedrock-foundation
Secrets (in dotenvx):
Primary Use: AI model inference via Bedrock
Never use AWS for: Web hosting, DNS (use Cloudflare instead)
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.