Skip to content

Commit 578acc5

Browse files
authored
feat: Add Bedrock inference profile permissions for cross-region support (#33)
- Added bedrock:ListInferenceProfiles permission to list available inference profiles - Added bedrock:GetInferenceProfile permission to get details about specific profiles - Updated ARCHITECTURE.md to document all IAM permissions granted to authenticated users - These permissions enable cross-region inference profile discovery and selection
1 parent fa8a324 commit 578acc5

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

assets/docs/ARCHITECTURE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ The management CLI in `source/claude_code_with_bedrock/` provides IT administrat
2020

2121
The authentication infrastructure centers on an Amazon Cognito Identity Pool that federates OIDC tokens into AWS credentials. This creates a trust relationship between the organization's identity provider and AWS through an IAM OIDC Provider. The associated IAM role grants permissions specifically for Amazon Bedrock model invocation in configured regions. Every API call includes session tags containing the user's email and subject claim, ensuring complete attribution in CloudTrail logs.
2222

23+
#### IAM Permissions
24+
25+
The IAM role assigned to authenticated users grants the following Amazon Bedrock permissions:
26+
27+
- `bedrock:InvokeModel` - Invoke foundation models for text generation
28+
- `bedrock:InvokeModelWithResponseStream` - Invoke models with streaming responses
29+
- `bedrock:ListFoundationModels` - List available foundation models
30+
- `bedrock:GetFoundationModel` - Get details about specific models
31+
- `bedrock:GetFoundationModelAvailability` - Check model availability in regions
32+
- `bedrock:ListInferenceProfiles` - List available cross-region inference profiles
33+
- `bedrock:GetInferenceProfile` - Get details about specific inference profiles
34+
35+
These permissions are scoped to the configured regions and enable users to discover and invoke models through cross-region inference profiles, ensuring optimal performance and availability.
36+
2337
When monitoring is enabled, the solution deploys additional infrastructure to collect and analyze usage metrics. A VPC with public subnets hosts an ECS Fargate cluster running the OpenTelemetry collector. An Application Load Balancer provides the ingestion endpoint for metrics from Claude Code clients. The collector processes these metrics and forwards them to CloudWatch Logs in Embedded Metric Format, enabling real-time dashboards and alerting.
2438

2539
For organizations requiring detailed analytics, the optional analytics stack provides comprehensive usage analysis capabilities. Kinesis Data Firehose continuously streams metrics from CloudWatch Logs to an S3 data lake, with a Lambda function transforming the data into Parquet format for efficient querying. Amazon Athena enables SQL analytics on this data, with pre-configured partition projection eliminating the need for Glue crawlers. This architecture supports queries spanning months of historical data while keeping costs minimal through columnar storage and lifecycle policies.

deployment/infrastructure/cognito-identity-pool.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ Resources:
145145
- 'bedrock:ListFoundationModels'
146146
- 'bedrock:GetFoundationModel'
147147
- 'bedrock:GetFoundationModelAvailability'
148+
- 'bedrock:ListInferenceProfiles'
149+
- 'bedrock:GetInferenceProfile'
148150
Resource: '*'
149151
Condition:
150152
StringEquals:

0 commit comments

Comments
 (0)