|
2 | 2 |
|
3 | 3 | ## Current Task Status |
4 | 4 |
|
5 | | -**Test Suite Dependency Fix**: ✅ **COMPLETED** - Fixed Missing Type Stubs Dependency |
| 5 | +**GovCloud S3 Vectors Fix**: ✅ **COMPLETED** - Fixed GovCloud Deployment Failure Due to S3 Vectors Service |
6 | 6 |
|
7 | 7 | **Previous Tasks**: |
| 8 | +- ✅ **COMPLETED** - Test Suite Dependency Fix |
8 | 9 | - ✅ **COMPLETED** - ProcessChanges Resolver Fix & Agent Analytics Optimization |
9 | 10 | - ✅ **COMPLETED** - Section Edit Mode Performance Optimization |
10 | 11 | - ✅ **COMPLETED** - IDP CLI Dependency Security Updates |
11 | 12 | - ✅ **COMPLETED** - Service Principal GovCloud Compatibility Updates |
12 | 13 |
|
| 14 | +## GovCloud S3 Vectors Fix |
| 15 | + |
| 16 | +Successfully resolved GovCloud deployment failure caused by S3 Vectors service not being available in GovCloud regions. |
| 17 | + |
| 18 | +### Issue Identified - GitHub Issue #159 |
| 19 | +- **Problem 1**: Service principal exception for `indexing.s3vectors.${AWS::URLSuffix}` - service doesn't exist in GovCloud |
| 20 | +- **Problem 2**: Default parameter `KnowledgeBaseVectorStore` was set to `S3_VECTORS` which doesn't work in GovCloud |
| 21 | +- **Problem 3**: Deploy script domain incorrect: `aws.amazonaws-us-gov.com` should be `amazonaws-us-gov.com` |
| 22 | +- **What Worked**: Deployment with OPENSEARCH_SERVERLESS succeeded |
| 23 | + |
| 24 | +### Root Cause Analysis |
| 25 | +- **S3 Vectors Service Availability**: S3 Vectors is a relatively new AWS service NOT available in GovCloud (us-gov-west-1, us-gov-east-1) |
| 26 | +- **KMS Policy Issue**: Template's KMS key policy included conditional statement for S3 Vectors service principal even in GovCloud |
| 27 | +- **Parameter Problem**: `KnowledgeBaseVectorStore` parameter defaulted to S3_VECTORS, causing confusion and potential deployment attempts with unavailable service |
| 28 | + |
| 29 | +### Solution Implemented |
| 30 | + |
| 31 | +**File Modified**: `scripts/generate_govcloud_template.py` |
| 32 | + |
| 33 | +#### Change 1: Parameter Removal |
| 34 | +- Added `KnowledgeBaseVectorStore` to `self.ui_parameters` removal set |
| 35 | +- Ensures the parameter is completely removed from GovCloud template |
| 36 | +- Users won't see S3_VECTORS option in GovCloud deployments |
| 37 | + |
| 38 | +#### Change 2: Force Condition to False |
| 39 | +```python |
| 40 | +# In remove_conditions() method |
| 41 | +if 'IsS3VectorsVectorStore' in conditions: |
| 42 | + conditions['IsS3VectorsVectorStore'] = False |
| 43 | + self.logger.info("Forced IsS3VectorsVectorStore condition to False for GovCloud") |
| 44 | +``` |
| 45 | +- Forces `IsS3VectorsVectorStore` condition to `False` instead of removing it |
| 46 | +- Ensures S3 Vectors KMS policy statement evaluates to `!Ref AWS::NoValue` and is excluded |
| 47 | +- CloudFormation won't validate the non-existent service principal |
| 48 | + |
| 49 | +#### Change 3: Domain Reference Fix |
| 50 | +```python |
| 51 | +# In print_deployment_summary() method |
| 52 | +if "us-gov" in region: |
| 53 | + domain="amazonaws-us-gov.com" # Fixed from aws.amazonaws-us-gov.com |
| 54 | +``` |
| 55 | +- Corrected GovCloud console domain for 1-Click Launch URLs |
| 56 | + |
| 57 | +### Impact & Benefits |
| 58 | + |
| 59 | +**Deployment Success**: |
| 60 | +- ✅ GovCloud templates now deploy successfully without service principal errors |
| 61 | +- ✅ Knowledge Base functionality properly disabled for GovCloud compatibility |
| 62 | +- ✅ Correct 1-Click Launch URLs for GovCloud console |
| 63 | + |
| 64 | +**User Experience**: |
| 65 | +- ✅ No confusing S3_VECTORS option shown in GovCloud deployments |
| 66 | +- ✅ Clear path forward: OPENSEARCH_SERVERLESS as vector store option |
| 67 | +- ✅ Simplified parameter choices for GovCloud users |
| 68 | + |
| 69 | +**Technical Implementation**: |
| 70 | +- ✅ Condition-based approach prevents KMS policy inclusion without template errors |
| 71 | +- ✅ Maintains proper CloudFormation conditional logic |
| 72 | +- ✅ Clean separation of commercial vs GovCloud feature sets |
| 73 | + |
| 74 | +### Files Modified |
| 75 | +- `scripts/generate_govcloud_template.py` - All three fixes implemented |
| 76 | +- `CHANGELOG.md` - Documented fix in Unreleased section |
| 77 | + |
| 78 | +### Testing Considerations |
| 79 | +To fully validate: |
| 80 | +1. Generate GovCloud template and verify `KnowledgeBaseVectorStore` parameter is absent |
| 81 | +2. Verify `IsS3VectorsVectorStore` condition is set to `False` (not removed) |
| 82 | +3. Confirm KMS key policy does NOT contain S3 Vectors service principal |
| 83 | +4. Test 1-Click launch URL uses correct domain (`amazonaws-us-gov.com`) |
| 84 | +5. Deploy to GovCloud region to confirm no service principal errors |
| 85 | + |
13 | 86 | ## Test Suite Dependency Fix |
14 | 87 |
|
15 | 88 | Successfully resolved test collection failure caused by missing type stubs dependency for Bedrock Runtime client. |
|
0 commit comments