cdk-factory 0.8.1__tar.gz → 0.8.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cdk-factory might be problematic. Click here for more details.
- cdk_factory-0.8.3/CHANGELOG_v0.8.1.md +148 -0
- cdk_factory-0.8.3/CHANGELOG_v0.8.2.md +391 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/PKG-INFO +1 -1
- cdk_factory-0.8.3/RELEASE_NOTES_v0.8.2.md +289 -0
- cdk_factory-0.8.3/SUMMARY_v0.8.2.md +335 -0
- cdk_factory-0.8.3/examples/json-imports/README.md +509 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/pyproject.toml +1 -1
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/interfaces/enhanced_ssm_parameter_mixin.py +30 -19
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/api_gateway/api_gateway_stack.py +10 -6
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/json_loading_utility.py +83 -31
- cdk_factory-0.8.3/src/cdk_factory/version.py +1 -0
- cdk_factory-0.8.1/src/cdk_factory/version.py +0 -1
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/.gitignore +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/.windsurfrules +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/GEEK_CAFE_FIX.md +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/LICENSE +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/README.md +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/archive/README.md +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/archive/migrate_to_enhanced_ssm.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/examples/separate-api-gateway/README.md +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/examples/separate-api-gateway/api-gateway-stack.json +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/examples/separate-api-gateway/config.json +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/examples/separate-api-gateway/lambda-stack.json +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/mypy.ini +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/publish_to_pypi.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/publish_to_pypi.sh +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/pysetup.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/pysetup.sh +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/requirements.dev.txt +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/requirements.tests.txt +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/requirements.txt +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/run-checks.sh +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/run-tests-clean-venv.sh +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/run-tests.sh +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/app.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/builds/README.md +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/cdk.json +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/commands/command_loader.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/base_config.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/cdk_config.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/deployment.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/deployment_wave.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/devops.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/enhanced_base_config.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/enhanced_ssm_config.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/management.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/pipeline.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/pipeline_stage.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/_resources.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/api_gateway.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/apigateway_route_config.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/auto_scaling.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/cloudfront.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/cloudwatch_widget.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/code_artifact.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/code_artifact_login.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/code_repository.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/cognito.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/docker.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/dynamodb.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/ecr.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/exisiting.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/lambda_function.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/lambda_layers.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/lambda_triggers.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/load_balancer.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/rds.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/resource_mapping.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/resource_naming.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/resource_types.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/route53.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/route53_hosted_zone.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/rum.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/s3.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/security_group.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/security_group_full_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/sqs.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/resources/vpc.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/configurations/workload.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/cloudfront/cloudfront_distribution_construct.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/ecr/ecr_construct.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/lambdas/lambda_function_construct.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/lambdas/lambda_function_docker_construct.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/lambdas/lambda_function_role_construct.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/lambdas/policies/policy_docs.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/lambdas/policies/policy_statements.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/s3_buckets/s3_bucket_construct.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/s3_buckets/s3_bucket_replication_destination_construct.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/s3_buckets/s3_bucket_replication_source_construct.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/constructs/sqs/policies/sqs_policies.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/interfaces/istack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/interfaces/live_ssm_resolver.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/interfaces/ssm_parameter_mixin.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/lambdas/health_handler.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/pipeline/pipeline_factory.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/pipeline/security/policies.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/pipeline/security/roles.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/pipeline/stage.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack/istack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack/stack_factory.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack/stack_module_loader.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack/stack_module_registry.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack/stack_modules.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/auto_scaling/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/aws_lambdas/lambda_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/buckets/README.md +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/buckets/bucket_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/code_artifact/code_artifact_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/cognito/cognito_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/dynamodb/dynamodb_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/ecr/README.md +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/ecr/ecr_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/load_balancer/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/load_balancer/load_balancer_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/rds/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/rds/rds_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/route53/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/route53/route53_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/rum/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/rum/rum_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/security_group/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/security_group/security_group_full_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/security_group/security_group_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/simple_queue_service/sqs_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/stack_base.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/vpc/__init__.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/vpc/vpc_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stack_library/websites/static_website_stack.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/stages/websites/static_website_stage.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/api_gateway_integration_utility.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/commandline_args.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/configuration_loader.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/docker_utilities.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/environment_services.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/file_operations.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/git_utilities.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/lambda_function_utilities.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utilities/os_execute.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/utils/api_gateway_utilities.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/cdk_factory/workload/workload_factory.py +0 -0
- {cdk_factory-0.8.1 → cdk_factory-0.8.3}/src/handlers/test/handler.py +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# CDK Factory v0.8.1 Release Notes
|
|
2
|
+
|
|
3
|
+
Released: 2025-10-09
|
|
4
|
+
|
|
5
|
+
## Bug Fixes
|
|
6
|
+
|
|
7
|
+
### 1. Fixed SSM Export Configuration Bug
|
|
8
|
+
**Issue**: Documentation showed incorrect pattern `"exports": {"enabled": true}` which caused `AttributeError: 'bool' object has no attribute 'startswith'`
|
|
9
|
+
|
|
10
|
+
**Fix**:
|
|
11
|
+
- Added type validation in `enhanced_ssm_config.py` to handle non-string values
|
|
12
|
+
- Updated documentation to show correct pattern: `"auto_export": true`
|
|
13
|
+
- Created comprehensive documentation in `docs/SSM_EXPORT_FIX.md`
|
|
14
|
+
|
|
15
|
+
**Impact**: Prevents crashes when using incorrect SSM export configuration
|
|
16
|
+
|
|
17
|
+
### 2. Fixed Cognito User Pool SSM Import for API Gateway
|
|
18
|
+
**Issue**: API Gateway couldn't find Cognito User Pool ARN, causing `ValueError: User pool ID is required for API Gateway authorizer`
|
|
19
|
+
|
|
20
|
+
**Fix**:
|
|
21
|
+
- Enhanced SSM-based import pattern for `user_pool_arn`
|
|
22
|
+
- Created comprehensive guide in `docs/API_GATEWAY_COGNITO_SSM.md`
|
|
23
|
+
- Added auto-discovery support via `"user_pool_arn": "auto"`
|
|
24
|
+
|
|
25
|
+
**Impact**: Enables seamless cross-stack Cognito + API Gateway integration
|
|
26
|
+
|
|
27
|
+
### 3. Fixed Authorizer Creation When Not Needed
|
|
28
|
+
**Issue**: API Gateway authorizer was created even when all routes were public (`authorization_type: "NONE"`), causing CDK validation error: `ValidationError: Authorizer must be attached to a RestApi`
|
|
29
|
+
|
|
30
|
+
**Fix**:
|
|
31
|
+
- Modified `_setup_cognito_authorizer()` to only create authorizer when at least one route requires it
|
|
32
|
+
- Added `cognito_configured` flag to maintain security validation context
|
|
33
|
+
- Security warnings still emitted for public endpoints when Cognito is available
|
|
34
|
+
|
|
35
|
+
**Impact**:
|
|
36
|
+
- Prevents CDK synthesis errors for public-only APIs
|
|
37
|
+
- Maintains security validation without creating unused resources
|
|
38
|
+
- Reduces AWS resource overhead
|
|
39
|
+
|
|
40
|
+
### 4. Removed Deprecated SSM Parameter Types
|
|
41
|
+
**Issue**: Using deprecated `ssm.ParameterType.STRING`, `ssm.ParameterType.STRING_LIST`, and `type` parameter caused AWS CDK deprecation warnings
|
|
42
|
+
|
|
43
|
+
**Fix**:
|
|
44
|
+
- Replaced deprecated `ParameterType` enum with appropriate CDK constructs:
|
|
45
|
+
- `StringParameter` for regular strings (no `type` parameter needed)
|
|
46
|
+
- `StringListParameter` for string lists
|
|
47
|
+
- `CfnParameter` with `type="SecureString"` for secure strings
|
|
48
|
+
- Updated `enhanced_ssm_parameter_mixin.py` to use CDK v2 best practices
|
|
49
|
+
|
|
50
|
+
**Impact**:
|
|
51
|
+
- Eliminates deprecation warnings
|
|
52
|
+
- Future-proofs code for CDK v3
|
|
53
|
+
- Follows AWS CDK v2 best practices
|
|
54
|
+
|
|
55
|
+
## Test Coverage
|
|
56
|
+
|
|
57
|
+
- **153 tests passing** ✅
|
|
58
|
+
- New test coverage:
|
|
59
|
+
- `test_api_gateway_export_config.py` (6 tests)
|
|
60
|
+
- `test_api_gateway_authorizer_ssm_integration.py` (5 tests)
|
|
61
|
+
- `test_cross_stack_ssm_integration.py` (3 tests)
|
|
62
|
+
- `test_api_gateway_enhanced_authorization_validation.py` (6 tests)
|
|
63
|
+
|
|
64
|
+
## Documentation Added
|
|
65
|
+
|
|
66
|
+
1. **docs/SSM_EXPORT_FIX.md** - SSM export configuration bug fix guide
|
|
67
|
+
2. **docs/API_GATEWAY_COGNITO_SSM.md** - Comprehensive Cognito + API Gateway SSM integration guide
|
|
68
|
+
3. **GEEK_CAFE_FIX.md** - Quick fix guide for geek-cafe project (example usage)
|
|
69
|
+
|
|
70
|
+
## Breaking Changes
|
|
71
|
+
|
|
72
|
+
None - all changes are backward compatible
|
|
73
|
+
|
|
74
|
+
## Migration Guide
|
|
75
|
+
|
|
76
|
+
### If you're using the old export pattern:
|
|
77
|
+
|
|
78
|
+
**Before (v0.8.0 - incorrect docs):**
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"ssm": {
|
|
82
|
+
"enabled": true,
|
|
83
|
+
"exports": {
|
|
84
|
+
"enabled": true // ❌ Wrong
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**After (v0.8.1):**
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"ssm": {
|
|
94
|
+
"enabled": true,
|
|
95
|
+
"auto_export": true // ✅ Correct
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### If you're getting Cognito User Pool errors:
|
|
101
|
+
|
|
102
|
+
Add to your API Gateway stack config:
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"api_gateway": {
|
|
106
|
+
"ssm": {
|
|
107
|
+
"imports": {
|
|
108
|
+
"user_pool_arn": "auto" // ✅ Add this
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### If you have public-only API routes:
|
|
116
|
+
|
|
117
|
+
Your config should work without changes. The authorizer will only be created if needed:
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"cognito_authorizer": {
|
|
121
|
+
"authorizer_name": "my-authorizer" // Config present but not used
|
|
122
|
+
},
|
|
123
|
+
"routes": [
|
|
124
|
+
{
|
|
125
|
+
"path": "/public",
|
|
126
|
+
"method": "GET",
|
|
127
|
+
"authorization_type": "NONE", // ✅ Authorizer won't be created
|
|
128
|
+
"allow_public_override": true
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Deployment Flow (v0.8.1+)
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
1. Cognito Stack → Exports user_pool_arn to SSM
|
|
138
|
+
2. Lambda Stack → Exports Lambda ARNs to SSM
|
|
139
|
+
3. API Gateway Stack → Imports both, creates authorizer only if needed
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Known Issues
|
|
143
|
+
|
|
144
|
+
None
|
|
145
|
+
|
|
146
|
+
## Contributors
|
|
147
|
+
|
|
148
|
+
- Eric Wilson (@geekcafe)
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
# CDK Factory v0.8.2 Release Notes
|
|
2
|
+
|
|
3
|
+
Released: 2025-10-09
|
|
4
|
+
|
|
5
|
+
## New Features
|
|
6
|
+
|
|
7
|
+
### 1. `__imports__` Keyword for JSON Configuration Files
|
|
8
|
+
**The preferred and more intuitive way to import configuration files!**
|
|
9
|
+
|
|
10
|
+
**Why**: The `__imports__` keyword is more intuitive and better describes what it does - importing configuration from other files or sections.
|
|
11
|
+
|
|
12
|
+
**Backward Compatibility**: `__inherits__` continues to work for existing configurations. Both keywords are supported, with `__imports__` taking precedence if both are present.
|
|
13
|
+
|
|
14
|
+
#### Usage Examples
|
|
15
|
+
|
|
16
|
+
**Single File Import:**
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"__imports__": "./base-lambda-config.json",
|
|
20
|
+
"name": "my-specific-lambda",
|
|
21
|
+
"memory": 512
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Multiple File Imports (merged in order):**
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"__imports__": [
|
|
29
|
+
"./base-config.json",
|
|
30
|
+
"./environment/prod.json",
|
|
31
|
+
"./overrides.json"
|
|
32
|
+
],
|
|
33
|
+
"handler": "index.handler"
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Nested Section Import:**
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"lambda": {
|
|
41
|
+
"__imports__": ["./common-env-vars.json", "./api-keys.json"],
|
|
42
|
+
"timeout": 60
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Nested Reference Import:**
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"__imports__": "workload.defaults.lambda_config",
|
|
51
|
+
"name": "my-lambda"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### Key Benefits
|
|
56
|
+
|
|
57
|
+
1. **More Intuitive**: "imports" better describes the action than "inherits"
|
|
58
|
+
2. **Consistent with Programming**: Matches `import` statements in code
|
|
59
|
+
3. **Backward Compatible**: Existing `__inherits__` configs continue to work
|
|
60
|
+
4. **Precedence**: `__imports__` takes precedence if both keywords are present
|
|
61
|
+
5. **Better Error Messages**: Clear examples shown when invalid syntax is used
|
|
62
|
+
|
|
63
|
+
#### Migration Guide
|
|
64
|
+
|
|
65
|
+
**Not required!** Your existing configurations using `__inherits__` will continue to work. However, for new configurations, we recommend using `__imports__`:
|
|
66
|
+
|
|
67
|
+
**Before (still works):**
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"__inherits__": "./base.json",
|
|
71
|
+
"name": "my-app"
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**After (recommended):**
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"__imports__": "./base.json",
|
|
79
|
+
"name": "my-app"
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Bug Fixes from v0.8.1
|
|
84
|
+
|
|
85
|
+
### 1. Fixed SSM Export Configuration Bug
|
|
86
|
+
**Issue**: Documentation showed incorrect pattern `"exports": {"enabled": true}` which caused `AttributeError: 'bool' object has no attribute 'startswith'`
|
|
87
|
+
|
|
88
|
+
**Fix**:
|
|
89
|
+
- Added type validation in `enhanced_ssm_config.py`
|
|
90
|
+
- Updated documentation to show correct pattern: `"auto_export": true`
|
|
91
|
+
|
|
92
|
+
**Impact**: Prevents crashes when using incorrect SSM export configuration
|
|
93
|
+
|
|
94
|
+
### 2. Fixed Cognito User Pool SSM Import for API Gateway
|
|
95
|
+
**Issue**: API Gateway couldn't find Cognito User Pool ARN, causing `ValueError: User pool ID is required for API Gateway authorizer`
|
|
96
|
+
|
|
97
|
+
**Fix**:
|
|
98
|
+
- Enhanced SSM-based import pattern for `user_pool_arn`
|
|
99
|
+
- Added auto-discovery support via `"user_pool_arn": "auto"`
|
|
100
|
+
|
|
101
|
+
**Impact**: Enables seamless cross-stack Cognito + API Gateway integration
|
|
102
|
+
|
|
103
|
+
### 3. Fixed Authorizer Creation When Not Needed
|
|
104
|
+
**Issue**: API Gateway authorizer was created even when all routes were public (`authorization_type: "NONE"`), causing CDK validation error: `ValidationError: Authorizer must be attached to a RestApi`
|
|
105
|
+
|
|
106
|
+
**Fix**:
|
|
107
|
+
- Modified `_setup_cognito_authorizer()` to only create authorizer when at least one route requires it
|
|
108
|
+
- Added `cognito_configured` flag to maintain security validation context
|
|
109
|
+
- Security warnings still emitted for public endpoints when Cognito is available
|
|
110
|
+
|
|
111
|
+
**Impact**:
|
|
112
|
+
- Prevents CDK synthesis errors for public-only APIs
|
|
113
|
+
- Maintains security validation without creating unused resources
|
|
114
|
+
|
|
115
|
+
### 4. Removed Deprecated SSM Parameter Types
|
|
116
|
+
**Issue**: Using deprecated `ssm.ParameterType.STRING`, `ssm.ParameterType.STRING_LIST`, and `type` parameter caused AWS CDK deprecation warnings
|
|
117
|
+
|
|
118
|
+
**Fix**:
|
|
119
|
+
- Replaced deprecated `ParameterType` enum with appropriate CDK constructs
|
|
120
|
+
- Updated `enhanced_ssm_parameter_mixin.py` to use CDK v2 best practices
|
|
121
|
+
|
|
122
|
+
**Impact**:
|
|
123
|
+
- Eliminates deprecation warnings
|
|
124
|
+
- Future-proofs code for CDK v3
|
|
125
|
+
|
|
126
|
+
## Test Coverage
|
|
127
|
+
|
|
128
|
+
- **161 tests passing** ✅ (up from 153)
|
|
129
|
+
- New test coverage:
|
|
130
|
+
- `test_json_loading_utility.py` - 8 new tests for `__imports__` functionality
|
|
131
|
+
- All existing tests for `__inherits__` maintained for backward compatibility
|
|
132
|
+
|
|
133
|
+
## Documentation Updates
|
|
134
|
+
|
|
135
|
+
### New Documentation
|
|
136
|
+
1. **docs/JSON_IMPORTS_GUIDE.md** - Comprehensive guide for `__imports__` usage
|
|
137
|
+
2. **CHANGELOG_v0.8.2.md** - This file
|
|
138
|
+
|
|
139
|
+
### Updated Documentation
|
|
140
|
+
- **docs/SSM_EXPORT_FIX.md** - SSM export configuration bug fix guide
|
|
141
|
+
- **docs/API_GATEWAY_COGNITO_SSM.md** - Cognito + API Gateway SSM integration
|
|
142
|
+
- **README.md** - Updated with v0.8.2 features
|
|
143
|
+
|
|
144
|
+
## Breaking Changes
|
|
145
|
+
|
|
146
|
+
**None** - All changes are backward compatible
|
|
147
|
+
|
|
148
|
+
## Configuration Examples
|
|
149
|
+
|
|
150
|
+
### Example 1: Lambda Stack with Imports
|
|
151
|
+
|
|
152
|
+
**base-lambda-config.json:**
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"runtime": "python3.13",
|
|
156
|
+
"memory": 128,
|
|
157
|
+
"timeout": 30,
|
|
158
|
+
"environment_variables": [
|
|
159
|
+
{"name": "LOG_LEVEL", "value": "INFO"}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**prod-lambda.json:**
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"__imports__": "./base-lambda-config.json",
|
|
168
|
+
"name": "my-prod-lambda",
|
|
169
|
+
"memory": 512,
|
|
170
|
+
"timeout": 60,
|
|
171
|
+
"handler": "index.handler"
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Result**: Lambda inherits base config but overrides memory and timeout.
|
|
176
|
+
|
|
177
|
+
### Example 2: Multiple Config Layers
|
|
178
|
+
|
|
179
|
+
**base.json:**
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"api_version": "v1",
|
|
183
|
+
"cors": {
|
|
184
|
+
"origins": ["*"],
|
|
185
|
+
"methods": ["GET", "POST"]
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**environment/prod.json:**
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"cors": {
|
|
194
|
+
"origins": ["https://myapp.com"]
|
|
195
|
+
},
|
|
196
|
+
"throttling": {
|
|
197
|
+
"rate_limit": 1000,
|
|
198
|
+
"burst_limit": 2000
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**my-api.json:**
|
|
204
|
+
```json
|
|
205
|
+
{
|
|
206
|
+
"__imports__": ["./base.json", "./environment/prod.json"],
|
|
207
|
+
"name": "my-api",
|
|
208
|
+
"stage_name": "prod"
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Result**: Deep merge of base config + environment config + specific config.
|
|
213
|
+
|
|
214
|
+
### Example 3: Nested Section Imports
|
|
215
|
+
|
|
216
|
+
**common-env-vars.json:**
|
|
217
|
+
```json
|
|
218
|
+
[
|
|
219
|
+
{"name": "AWS_REGION", "value": "us-east-1"},
|
|
220
|
+
{"name": "LOG_LEVEL", "value": "INFO"}
|
|
221
|
+
]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**lambda-config.json:**
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"name": "my-lambda",
|
|
228
|
+
"runtime": "python3.13",
|
|
229
|
+
"environment_variables": {
|
|
230
|
+
"__imports__": "./common-env-vars.json"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Example 4: Backward Compatibility
|
|
236
|
+
|
|
237
|
+
**Still works with `__inherits__`:**
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"__inherits__": "./base.json",
|
|
241
|
+
"name": "legacy-config"
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## Deployment Flow (v0.8.2)
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
1. Cognito Stack → Exports user_pool_arn to SSM
|
|
249
|
+
2. Lambda Stack → Exports Lambda ARNs to SSM
|
|
250
|
+
3. API Gateway Stack → Imports via SSM, creates authorizer only if needed
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## API Gateway Configuration Best Practices
|
|
254
|
+
|
|
255
|
+
### For Public APIs
|
|
256
|
+
```json
|
|
257
|
+
{
|
|
258
|
+
"api_gateway": {
|
|
259
|
+
"name": "my-public-api",
|
|
260
|
+
"routes": [
|
|
261
|
+
{
|
|
262
|
+
"path": "/public",
|
|
263
|
+
"method": "GET",
|
|
264
|
+
"authorization_type": "NONE",
|
|
265
|
+
"allow_public_override": true
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### For Secured APIs with Cognito
|
|
273
|
+
```json
|
|
274
|
+
{
|
|
275
|
+
"api_gateway": {
|
|
276
|
+
"name": "my-secure-api",
|
|
277
|
+
"ssm": {
|
|
278
|
+
"enabled": true,
|
|
279
|
+
"auto_export": true,
|
|
280
|
+
"imports": {
|
|
281
|
+
"user_pool_arn": "auto"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"cognito_authorizer": {
|
|
285
|
+
"authorizer_name": "my-authorizer"
|
|
286
|
+
},
|
|
287
|
+
"routes": [
|
|
288
|
+
{
|
|
289
|
+
"path": "/secure",
|
|
290
|
+
"method": "GET"
|
|
291
|
+
// No authorization_type means defaults to COGNITO_USER_POOLS
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Upgrade Instructions
|
|
299
|
+
|
|
300
|
+
### From v0.8.1 to v0.8.2
|
|
301
|
+
|
|
302
|
+
1. **Update package:**
|
|
303
|
+
```bash
|
|
304
|
+
pip install --upgrade cdk-factory
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
2. **Optional - Migrate to `__imports__`:**
|
|
308
|
+
|
|
309
|
+
Find all `__inherits__` usage:
|
|
310
|
+
```bash
|
|
311
|
+
grep -r "__inherits__" ./configs/
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Replace with `__imports__` (optional):
|
|
315
|
+
```bash
|
|
316
|
+
sed -i '' 's/"__inherits__"/"__imports__"/g' ./configs/*.json
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
3. **No code changes required** - All existing configurations continue to work!
|
|
320
|
+
|
|
321
|
+
### From v0.8.0 or earlier to v0.8.2
|
|
322
|
+
|
|
323
|
+
Follow the v0.8.1 migration guide first, then upgrade to v0.8.2.
|
|
324
|
+
|
|
325
|
+
**Critical v0.8.1 fixes to apply:**
|
|
326
|
+
|
|
327
|
+
1. **Fix SSM export config:**
|
|
328
|
+
```json
|
|
329
|
+
// Change from:
|
|
330
|
+
"exports": {"enabled": true}
|
|
331
|
+
|
|
332
|
+
// To:
|
|
333
|
+
"auto_export": true
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
2. **Add Cognito SSM import:**
|
|
337
|
+
```json
|
|
338
|
+
"api_gateway": {
|
|
339
|
+
"ssm": {
|
|
340
|
+
"imports": {
|
|
341
|
+
"user_pool_arn": "auto"
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Known Issues
|
|
348
|
+
|
|
349
|
+
None
|
|
350
|
+
|
|
351
|
+
## Performance Improvements
|
|
352
|
+
|
|
353
|
+
- JSON loading with multiple imports is optimized for merge operations
|
|
354
|
+
- SSM parameter lookups use enhanced caching
|
|
355
|
+
|
|
356
|
+
## Security Enhancements
|
|
357
|
+
|
|
358
|
+
- Maintained secure-by-default API Gateway authorization
|
|
359
|
+
- Improved validation warnings for public endpoints when Cognito is available
|
|
360
|
+
- Better error messages for misconfigurations
|
|
361
|
+
|
|
362
|
+
## Contributors
|
|
363
|
+
|
|
364
|
+
- Eric Wilson (@geekcafe)
|
|
365
|
+
|
|
366
|
+
## Next Steps
|
|
367
|
+
|
|
368
|
+
Check out the new `__imports__` feature in your configurations! It makes config management much more intuitive.
|
|
369
|
+
|
|
370
|
+
**Try it out:**
|
|
371
|
+
```bash
|
|
372
|
+
# Create a base config
|
|
373
|
+
cat > base-lambda.json <<EOF
|
|
374
|
+
{
|
|
375
|
+
"runtime": "python3.13",
|
|
376
|
+
"memory": 128,
|
|
377
|
+
"timeout": 30
|
|
378
|
+
}
|
|
379
|
+
EOF
|
|
380
|
+
|
|
381
|
+
# Use imports in your stack config
|
|
382
|
+
cat > my-lambda.json <<EOF
|
|
383
|
+
{
|
|
384
|
+
"__imports__": "./base-lambda.json",
|
|
385
|
+
"name": "my-lambda",
|
|
386
|
+
"handler": "index.handler"
|
|
387
|
+
}
|
|
388
|
+
EOF
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Happy deploying! 🚀
|