{"id":31078106,"url":"https://github.com/scttfrdmn/genkit-aws","last_synced_at":"2026-05-03T20:35:08.943Z","repository":{"id":314624541,"uuid":"1056198975","full_name":"scttfrdmn/genkit-aws","owner":"scttfrdmn","description":"AWS plugins for Google's GenKit framework - add AWS Bedrock models and CloudWatch monitoring to your existing GenKit applications","archived":false,"fork":false,"pushed_at":"2025-09-13T16:52:32.000Z","size":11175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-13T17:53:42.829Z","etag":null,"topics":["ai","aws","bedrock","claude","cloudwatch","genkit","golang","llama","nova","plugin"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scttfrdmn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["scttfrdmn"],"custom":["https://buymeacoffee.com/scottfriedman"]}},"created_at":"2025-09-13T15:40:25.000Z","updated_at":"2025-09-13T16:52:35.000Z","dependencies_parsed_at":"2025-09-13T18:06:25.974Z","dependency_job_id":null,"html_url":"https://github.com/scttfrdmn/genkit-aws","commit_stats":null,"previous_names":["scttfrdmn/genkit-aws"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/scttfrdmn/genkit-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scttfrdmn%2Fgenkit-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scttfrdmn%2Fgenkit-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scttfrdmn%2Fgenkit-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scttfrdmn%2Fgenkit-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scttfrdmn","download_url":"https://codeload.github.com/scttfrdmn/genkit-aws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scttfrdmn%2Fgenkit-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275384116,"owners_count":25454910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-16T02:00:10.229Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","aws","bedrock","claude","cloudwatch","genkit","golang","llama","nova","plugin"],"created_at":"2025-09-16T08:03:29.570Z","updated_at":"2025-09-16T08:03:34.320Z","avatar_url":"https://github.com/scttfrdmn.png","language":"Go","funding_links":["https://github.com/sponsors/scttfrdmn","https://buymeacoffee.com/scottfriedman"],"categories":[],"sub_categories":[],"readme":"# GenKit AWS Plugins\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/scttfrdmn/genkit-aws)](https://goreportcard.com/report/github.com/scttfrdmn/genkit-aws)\n[![Go Reference](https://pkg.go.dev/badge/github.com/scttfrdmn/genkit-aws.svg)](https://pkg.go.dev/github.com/scttfrdmn/genkit-aws)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Coverage](https://img.shields.io/badge/Coverage-33.7%25-yellow.svg)](./coverage.html)\n[![GitHub release](https://img.shields.io/github/v/release/scttfrdmn/genkit-aws)](https://github.com/scttfrdmn/genkit-aws/releases)\n[![GitHub issues](https://img.shields.io/github/issues/scttfrdmn/genkit-aws)](https://github.com/scttfrdmn/genkit-aws/issues)\n\n**AWS plugins for Google's GenKit framework** - add AWS Bedrock models and CloudWatch monitoring to your existing GenKit applications.\n\n\u003e **Important**: This is NOT a fork or port of GenKit. These are plugins that extend Google's GenKit framework to work with AWS services.\n\n## What This Provides\n\n- **AWS Bedrock Integration**: Use 40+ AWS models (Claude, Nova, Llama) through GenKit's standard API\n- **CloudWatch Monitoring**: Automatic flow metrics and observability for GenKit applications  \n- **Seamless Integration**: Keep using GenKit's APIs, just add AWS capabilities\n\n## Quick Start\n\n### 1. Install Google's GenKit Framework First\n```bash\ngo get github.com/firebase/genkit/go@latest\n```\n\n### 2. Add AWS Plugins\n```bash\ngo get github.com/scttfrdmn/genkit-aws@latest\n```\n\n### 3. Use AWS Models in GenKit\n```go\nimport (\n    // Google's GenKit framework\n    \"github.com/firebase/genkit/go/genkit\"\n    \"github.com/firebase/genkit/go/ai\"\n    \n    // AWS plugins that extend GenKit\n    genkitaws \"github.com/scttfrdmn/genkit-aws/pkg/genkit-aws\"\n    \"github.com/scttfrdmn/genkit-aws/pkg/bedrock\"\n    \"github.com/scttfrdmn/genkit-aws/pkg/monitoring\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    // Initialize GenKit with AWS plugins\n    err := genkit.Init(ctx, \u0026genkit.Config{\n        Plugins: []genkit.Plugin{\n            genkitaws.New(\u0026genkitaws.Config{\n                Region: \"us-east-1\",\n                Bedrock: \u0026bedrock.Config{\n                    Models: []string{\"anthropic.claude-3-sonnet-20240229-v1:0\"},\n                },\n                CloudWatch: \u0026monitoring.Config{\n                    Namespace: \"MyApp/GenKit\",\n                },\n            }),\n        },\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Use GenKit's standard API with AWS models\n    resp, err := genkit.Generate(ctx, \u0026ai.GenerateRequest{\n        Model: genkit.Model(\"anthropic.claude-3-sonnet-20240229-v1:0\"), // Now available!\n        Messages: []*ai.Message{\n            {Role: ai.RoleUser, Content: []*ai.Part{{Text: \"Hello!\"}}},\n        },\n    })\n}\n```\n\n## How It Works\n\n1. **You use Google's GenKit framework** as normal\n2. **Our plugins register AWS models** with GenKit's model registry  \n3. **GenKit's APIs work unchanged** - they just have more models available\n4. **Monitoring automatically instruments** your existing GenKit flows\n\n## Architecture\n\n```\nYour GenKit App\n       ↓\nGoogle's GenKit Framework (genkit.Model(), genkit.Generate(), etc.)\n       ↓\nOur AWS Plugins (genkitaws.New())\n       ↓\nAWS Services (Bedrock, CloudWatch)\n```\n\n## Available AWS Models\n\n### Anthropic Claude\n- `anthropic.claude-3-5-sonnet-20241022-v2:0`\n- `anthropic.claude-3-sonnet-20240229-v1:0`  \n- `anthropic.claude-3-haiku-20240307-v1:0`\n\n### Amazon Nova (Latest)\n- `amazon.nova-pro-v1:0`\n- `amazon.nova-lite-v1:0`\n- `amazon.nova-micro-v1:0`\n\n### Meta Llama  \n- `meta.llama3-2-90b-instruct-v1:0`\n- `meta.llama3-2-11b-instruct-v1:0`\n\n[See all 40+ supported models](docs/bedrock-models.md)\n\n## Monitoring Integration\n\nThe CloudWatch plugin automatically tracks:\n\n- **Flow Performance**: Duration, success rates, error types\n- **Model Usage**: Token consumption, generation latency  \n- **Custom Metrics**: Configurable dimensions and namespaces\n\nView in AWS CloudWatch under your configured namespace.\n\n## Examples\n\n### Basic Usage\n```go\n// Initialize GenKit + AWS plugins\nerr := genkit.Init(ctx, \u0026genkit.Config{\n    Plugins: []genkit.Plugin{\n        genkitaws.New(\u0026genkitaws.Config{\n            Region: \"us-east-1\",\n            Bedrock: \u0026bedrock.Config{\n                Models: []string{\"anthropic.claude-3-sonnet-20240229-v1:0\"},\n            },\n        }),\n    },\n})\n\n// Use like any GenKit model\nresp, _ := genkit.Generate(ctx, \u0026ai.GenerateRequest{\n    Model: genkit.Model(\"anthropic.claude-3-sonnet-20240229-v1:0\"),\n    Messages: []*ai.Message{{Role: ai.RoleUser, Content: []*ai.Part{{Text: \"Hello\"}}}},\n})\n```\n\n### Multiple Providers\n```go\n// Mix Google AI, OpenAI, and AWS models in the same app\nerr := genkit.Init(ctx, \u0026genkit.Config{\n    Plugins: []genkit.Plugin{\n        googleai.New(\u0026googleai.Config{}),  // Google's plugin\n        openai.New(\u0026openai.Config{}),      // OpenAI plugin  \n        genkitaws.New(\u0026genkitaws.Config{  // Our AWS plugin\n            Region: \"us-east-1\",\n            Bedrock: \u0026bedrock.Config{\n                Models: []string{\"anthropic.claude-3-sonnet-20240229-v1:0\"},\n            },\n        }),\n    },\n})\n\n// All available through genkit.Model()\nmodels := []string{\n    \"googleai/gemini-1.5-pro\",                              // Google\n    \"openai/gpt-4\",                                        // OpenAI\n    \"anthropic.claude-3-sonnet-20240229-v1:0\",             // AWS\n}\n```\n\n### Flow with Monitoring\n```go\n// Define flow using GenKit's API\nflow := genkit.DefineFlow(\"myFlow\", func(ctx context.Context, input string) (string, error) {\n    resp, err := genkit.Generate(ctx, \u0026ai.GenerateRequest{\n        Model: genkit.Model(\"anthropic.claude-3-sonnet-20240229-v1:0\"),\n        Messages: []*ai.Message{{Role: ai.RoleUser, Content: []*ai.Part{{Text: input}}}},\n    })\n    if err != nil {\n        return \"\", err\n    }\n    return resp.Candidates[0].Message.Content[0].Text, nil\n})\n\n// Monitoring plugin automatically tracks this flow's performance\nresult, _ := flow.Run(ctx, \"What's the weather?\")\n```\n\n## Prerequisites\n\n- Go 1.23+\n- AWS credentials configured (`aws configure` or environment variables)\n- AWS Bedrock model access enabled in your region\n- Google's GenKit Go SDK\n\n## Installation \u0026 Setup\n\n### 1. Install Dependencies\n```bash\ngo mod init my-genkit-app\ngo get github.com/firebase/genkit/go@latest\ngo get github.com/scttfrdmn/genkit-aws@latest\n```\n\n### 2. Configure AWS Credentials\n```bash\naws configure\n# or set environment variables:\n# export AWS_REGION=us-east-1\n# export AWS_ACCESS_KEY_ID=...\n# export AWS_SECRET_ACCESS_KEY=...\n```\n\n### 3. Enable Bedrock Models\nGo to AWS Console → Bedrock → Model Access and enable the models you want to use.\n\n## Development\n\n### Running Examples\n```bash\ncd cmd/examples/bedrock-chat\ngo run main.go \"What is AI?\"\n\ncd cmd/examples/monitoring-demo  \ngo run main.go\n```\n\n### Testing\n```bash\nmake test              # Unit tests\nmake test-integration  # Integration tests (requires AWS credentials)\nmake lint             # Linting\n\n# Integration testing with custom AWS profile/region\nmake test-integration-custom AWS_PROFILE=myprofile AWS_REGION=us-east-1\n\n# Standalone integration test script\n./scripts/integration-test.sh aws us-west-2    # Custom profile and region\n./scripts/integration-test.sh                 # Use defaults (aws profile, us-west-2)\n```\n\n### Integration Testing\n\nThe project includes comprehensive integration tests that verify real AWS Bedrock and CloudWatch functionality:\n\n#### **Quick Integration Test**\n```bash\n# Test with your default AWS profile and us-west-2 region\n./scripts/integration-test.sh aws us-west-2\n```\n\n#### **Prerequisites for Integration Tests**\n- AWS CLI configured with valid credentials\n- AWS Bedrock model access enabled in your target region\n- Sufficient AWS permissions for Bedrock and CloudWatch\n\n#### **What Integration Tests Verify**\n- ✅ AWS authentication and configuration\n- ✅ Bedrock model availability and access\n- ✅ Model generation with real Claude/Nova models\n- ✅ CloudWatch metrics submission and buffering\n- ✅ Error handling with invalid models\n- ✅ Flow monitoring and instrumentation\n\n#### **Integration Test Options**\n```bash\n# Using Go test directly\nAWS_PROFILE=aws AWS_REGION=us-west-2 go test -tags=integration ./test/integration/\n\n# Using Makefile\nmake test-integration                                    # Uses aws profile, us-west-2\nmake test-integration-custom AWS_PROFILE=prod AWS_REGION=us-east-1\n\n# Using standalone script  \n./scripts/integration-test.sh aws us-west-2 10m         # Custom timeout\n```\n\n**⚠️ Note**: Integration tests will incur small AWS charges for Bedrock API calls and CloudWatch metrics.\n\n## Configuration\n\n### Bedrock Configuration\n```go\n\u0026bedrock.Config{\n    Models: []string{\n        \"anthropic.claude-3-sonnet-20240229-v1:0\",\n        \"amazon.nova-pro-v1:0\",\n    },\n    DefaultModelConfig: \u0026bedrock.ModelConfig{\n        MaxTokens:     4096,\n        Temperature:   0.7,\n        TopP:          0.9,\n        StopSequences: []string{\"STOP\"},\n    },\n    ModelConfigs: map[string]*bedrock.ModelConfig{\n        \"anthropic.claude-3-sonnet-20240229-v1:0\": {\n            MaxTokens:   8192,\n            Temperature: 0.5,\n        },\n    },\n}\n```\n\n### CloudWatch Configuration\n```go\n\u0026monitoring.Config{\n    Namespace:          \"MyApp/GenKit\",\n    EnableFlowMetrics:  true,\n    EnableModelMetrics: true,\n    CustomDimensions: map[string]string{\n        \"Environment\": \"Production\",\n        \"Version\":     \"1.0.0\",\n    },\n    MetricBufferSize: 20,\n}\n```\n\n## Relationship to GenKit\n\n| Component | Provided By |\n|-----------|-------------|\n| Core Framework | Google's GenKit |\n| Flow API | Google's GenKit |\n| Model Interface | Google's GenKit |\n| Prompt Management | Google's GenKit |\n| **AWS Bedrock Models** | **Our Plugin** |\n| **CloudWatch Monitoring** | **Our Plugin** |\n\n## Contributing\n\nWe welcome contributions! This project follows Google's GenKit plugin patterns and conventions.\n\n### Development Setup\n```bash\ngit clone https://github.com/scttfrdmn/genkit-aws\ncd genkit-aws\ngo mod download\nmake test\n```\n\n### Submitting Issues\nPlease use GitHub Issues for bug reports and feature requests.\n\n## License\n\nApache License 2.0 - see [LICENSE](LICENSE) for details.\n\n---\n\n**Note**: For GenKit framework documentation, see [Google's GenKit docs](https://firebase.google.com/docs/genkit). This repository only documents the AWS-specific plugins.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscttfrdmn%2Fgenkit-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscttfrdmn%2Fgenkit-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscttfrdmn%2Fgenkit-aws/lists"}