cdk-factory 0.8.2__tar.gz → 0.8.4__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.
Files changed (148) hide show
  1. cdk_factory-0.8.4/CHANGELOG_v0.8.2.md +391 -0
  2. cdk_factory-0.8.4/CHANGELOG_v0.8.3.md +223 -0
  3. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/PKG-INFO +1 -1
  4. cdk_factory-0.8.4/RELEASE_NOTES_v0.8.2.md +289 -0
  5. cdk_factory-0.8.4/SUMMARY_v0.8.2.md +335 -0
  6. cdk_factory-0.8.4/SUMMARY_v0.8.3.md +146 -0
  7. cdk_factory-0.8.4/examples/json-imports/README.md +509 -0
  8. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/pyproject.toml +1 -1
  9. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/pysetup.py +432 -675
  10. cdk_factory-0.8.4/requirements.tests.txt +3 -0
  11. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/run-tests.sh +15 -7
  12. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/api_gateway/api_gateway_stack.py +16 -7
  13. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/json_loading_utility.py +30 -6
  14. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/lambda_function_utilities.py +16 -2
  15. cdk_factory-0.8.4/src/cdk_factory/version.py +1 -0
  16. cdk_factory-0.8.2/requirements.tests.txt +0 -1
  17. cdk_factory-0.8.2/src/cdk_factory/version.py +0 -1
  18. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/.gitignore +0 -0
  19. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/.windsurfrules +0 -0
  20. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/CHANGELOG_v0.8.1.md +0 -0
  21. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/GEEK_CAFE_FIX.md +0 -0
  22. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/LICENSE +0 -0
  23. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/README.md +0 -0
  24. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/archive/README.md +0 -0
  25. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/archive/migrate_to_enhanced_ssm.py +0 -0
  26. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/examples/separate-api-gateway/README.md +0 -0
  27. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/examples/separate-api-gateway/api-gateway-stack.json +0 -0
  28. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/examples/separate-api-gateway/config.json +0 -0
  29. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/examples/separate-api-gateway/lambda-stack.json +0 -0
  30. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/mypy.ini +0 -0
  31. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/publish_to_pypi.py +0 -0
  32. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/publish_to_pypi.sh +0 -0
  33. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/pysetup.sh +0 -0
  34. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/requirements.dev.txt +0 -0
  35. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/requirements.txt +0 -0
  36. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/run-checks.sh +0 -0
  37. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/run-tests-clean-venv.sh +0 -0
  38. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/__init__.py +0 -0
  39. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/app.py +0 -0
  40. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/builds/README.md +0 -0
  41. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/cdk.json +0 -0
  42. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/commands/command_loader.py +0 -0
  43. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/base_config.py +0 -0
  44. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/cdk_config.py +0 -0
  45. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/deployment.py +0 -0
  46. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/deployment_wave.py +0 -0
  47. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/devops.py +0 -0
  48. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/enhanced_base_config.py +0 -0
  49. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/enhanced_ssm_config.py +0 -0
  50. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/management.py +0 -0
  51. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/pipeline.py +0 -0
  52. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/pipeline_stage.py +0 -0
  53. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/_resources.py +0 -0
  54. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/api_gateway.py +0 -0
  55. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/apigateway_route_config.py +0 -0
  56. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/auto_scaling.py +0 -0
  57. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/cloudfront.py +0 -0
  58. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/cloudwatch_widget.py +0 -0
  59. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/code_artifact.py +0 -0
  60. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/code_artifact_login.py +0 -0
  61. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/code_repository.py +0 -0
  62. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/cognito.py +0 -0
  63. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/docker.py +0 -0
  64. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/dynamodb.py +0 -0
  65. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/ecr.py +0 -0
  66. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/exisiting.py +0 -0
  67. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/lambda_function.py +0 -0
  68. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/lambda_layers.py +0 -0
  69. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/lambda_triggers.py +0 -0
  70. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/load_balancer.py +0 -0
  71. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/rds.py +0 -0
  72. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/resource_mapping.py +0 -0
  73. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/resource_naming.py +0 -0
  74. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/resource_types.py +0 -0
  75. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/route53.py +0 -0
  76. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/route53_hosted_zone.py +0 -0
  77. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/rum.py +0 -0
  78. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/s3.py +0 -0
  79. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/security_group.py +0 -0
  80. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/security_group_full_stack.py +0 -0
  81. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/sqs.py +0 -0
  82. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/resources/vpc.py +0 -0
  83. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/stack.py +0 -0
  84. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/configurations/workload.py +0 -0
  85. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/cloudfront/cloudfront_distribution_construct.py +0 -0
  86. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/ecr/ecr_construct.py +0 -0
  87. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/lambdas/lambda_function_construct.py +0 -0
  88. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/lambdas/lambda_function_docker_construct.py +0 -0
  89. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/lambdas/lambda_function_role_construct.py +0 -0
  90. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/lambdas/policies/policy_docs.py +0 -0
  91. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/lambdas/policies/policy_statements.py +0 -0
  92. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/s3_buckets/s3_bucket_construct.py +0 -0
  93. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/s3_buckets/s3_bucket_replication_destination_construct.py +0 -0
  94. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/s3_buckets/s3_bucket_replication_source_construct.py +0 -0
  95. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/constructs/sqs/policies/sqs_policies.py +0 -0
  96. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/interfaces/enhanced_ssm_parameter_mixin.py +0 -0
  97. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/interfaces/istack.py +0 -0
  98. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/interfaces/live_ssm_resolver.py +0 -0
  99. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/interfaces/ssm_parameter_mixin.py +0 -0
  100. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/lambdas/health_handler.py +0 -0
  101. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/pipeline/pipeline_factory.py +0 -0
  102. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/pipeline/security/policies.py +0 -0
  103. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/pipeline/security/roles.py +0 -0
  104. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/pipeline/stage.py +0 -0
  105. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack/istack.py +0 -0
  106. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack/stack_factory.py +0 -0
  107. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack/stack_module_loader.py +0 -0
  108. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack/stack_module_registry.py +0 -0
  109. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack/stack_modules.py +0 -0
  110. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/__init__.py +0 -0
  111. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/auto_scaling/__init__.py +0 -0
  112. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +0 -0
  113. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/aws_lambdas/lambda_stack.py +0 -0
  114. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/buckets/README.md +0 -0
  115. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/buckets/bucket_stack.py +0 -0
  116. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/code_artifact/code_artifact_stack.py +0 -0
  117. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/cognito/cognito_stack.py +0 -0
  118. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/dynamodb/dynamodb_stack.py +0 -0
  119. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/ecr/README.md +0 -0
  120. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/ecr/ecr_stack.py +0 -0
  121. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/load_balancer/__init__.py +0 -0
  122. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/load_balancer/load_balancer_stack.py +0 -0
  123. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/rds/__init__.py +0 -0
  124. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/rds/rds_stack.py +0 -0
  125. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/route53/__init__.py +0 -0
  126. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/route53/route53_stack.py +0 -0
  127. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/rum/__init__.py +0 -0
  128. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/rum/rum_stack.py +0 -0
  129. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/security_group/__init__.py +0 -0
  130. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/security_group/security_group_full_stack.py +0 -0
  131. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/security_group/security_group_stack.py +0 -0
  132. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/simple_queue_service/sqs_stack.py +0 -0
  133. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/stack_base.py +0 -0
  134. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/vpc/__init__.py +0 -0
  135. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/vpc/vpc_stack.py +0 -0
  136. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stack_library/websites/static_website_stack.py +0 -0
  137. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/stages/websites/static_website_stage.py +0 -0
  138. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/api_gateway_integration_utility.py +0 -0
  139. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/commandline_args.py +0 -0
  140. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/configuration_loader.py +0 -0
  141. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/docker_utilities.py +0 -0
  142. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/environment_services.py +0 -0
  143. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/file_operations.py +0 -0
  144. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/git_utilities.py +0 -0
  145. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utilities/os_execute.py +0 -0
  146. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/utils/api_gateway_utilities.py +0 -0
  147. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/cdk_factory/workload/workload_factory.py +0 -0
  148. {cdk_factory-0.8.2 → cdk_factory-0.8.4}/src/handlers/test/handler.py +0 -0
@@ -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! 🚀
@@ -0,0 +1,223 @@
1
+ # CDK Factory v0.8.3 Release Notes
2
+
3
+ Released: October 9, 2025
4
+
5
+ ## Bug Fixes
6
+
7
+ ### 1. Fixed Lambda Build Warning: "__pycache__ already exists"
8
+
9
+ **Issue**: During CDK synth/deploy, pip would display warnings:
10
+ ```
11
+ WARNING: Target directory /var/folders/.../lambda-builds/my-lambda/__pycache__ already exists.
12
+ Specify --upgrade to force replacement.
13
+ ```
14
+
15
+ **Root Cause**:
16
+ - Lambda source code was copied to the build directory, including `__pycache__` directories
17
+ - Pip would then complain about existing `__pycache__` directories when installing dependencies
18
+
19
+ **Fix**:
20
+ 1. **Excluded build artifacts during copy** (`lambda_function_utilities.py`)
21
+ - Added `ignore_patterns` function to `__validate_directories()`
22
+ - Excludes: `__pycache__`, `.pyc`, `.pyo`, `.pytest_cache`, `.mypy_cache`
23
+ - Prevents build artifacts from being copied to Lambda build directory
24
+
25
+ 2. **Added --upgrade flag to pip install**
26
+ - Changed: `pip install -r {requirement} -t {output_dir}`
27
+ - To: `pip install -r {requirement} -t {output_dir} --upgrade`
28
+ - Forces pip to replace any existing packages without warnings
29
+
30
+ **Impact**:
31
+ - ✅ Eliminates pip warnings during Lambda builds
32
+ - ✅ Cleaner build output
33
+ - ✅ Faster builds (no unnecessary `__pycache__` copies)
34
+ - ✅ More reliable builds
35
+
36
+ **Example Before:**
37
+ ```bash
38
+ cdk synth
39
+ # Output:
40
+ WARNING: Target directory /var/folders/2p/.../lambda-builds/my-lambda/__pycache__ already exists.
41
+ WARNING: Target directory /var/folders/2p/.../lambda-builds/my-lambda/.pytest_cache already exists.
42
+ ```
43
+
44
+ **Example After:**
45
+ ```bash
46
+ cdk synth
47
+ # Output: Clean, no warnings
48
+ ```
49
+
50
+ ### 2. Enhanced Lambda Route Naming in API Gateway
51
+
52
+ **Issue**: Multiple routes to the same path with different HTTP methods would cause naming conflicts.
53
+
54
+ **Fix**:
55
+ - Routes now support explicit `name` field for unique identification
56
+ - Auto-generated names include HTTP method for uniqueness: `{method}-{path}`
57
+ - Example: `GET /api/users` → `get-api-users`, `POST /api/users` → `post-api-users`
58
+
59
+ **Before:**
60
+ ```json
61
+ {
62
+ "routes": [
63
+ {"path": "/users", "method": "GET"}, // Could conflict
64
+ {"path": "/users", "method": "POST"} // Could conflict
65
+ ]
66
+ }
67
+ ```
68
+
69
+ **After (Auto-named):**
70
+ ```json
71
+ {
72
+ "routes": [
73
+ {"path": "/users", "method": "GET"}, // Auto-named: get-users
74
+ {"path": "/users", "method": "POST"} // Auto-named: post-users
75
+ ]
76
+ }
77
+ ```
78
+
79
+ **After (Explicit naming):**
80
+ ```json
81
+ {
82
+ "routes": [
83
+ {"path": "/users", "method": "GET", "name": "list-users"},
84
+ {"path": "/users", "method": "POST", "name": "create-user"}
85
+ ]
86
+ }
87
+ ```
88
+
89
+ ## Carried Forward from v0.8.2
90
+
91
+ All features and fixes from v0.8.2 are included:
92
+
93
+ ### Features
94
+ - ✅ **`__imports__` keyword** - More intuitive configuration imports
95
+ - ✅ **Backward compatible** - `__inherits__` still works
96
+
97
+ ### Bug Fixes
98
+ - ✅ **SSM Export Configuration** - Type validation
99
+ - ✅ **Cognito SSM Integration** - Auto-discovery support
100
+ - ✅ **Authorizer Creation** - Only created when needed
101
+ - ✅ **SSM Deprecation Warnings** - Eliminated
102
+
103
+ ## Test Coverage
104
+
105
+ - **167 tests passing** ✅
106
+ - All existing tests maintained
107
+ - No new tests needed (internal improvements)
108
+
109
+ ## Breaking Changes
110
+
111
+ **None** - All changes are backward compatible
112
+
113
+ ## Upgrade Instructions
114
+
115
+ ```bash
116
+ pip install --upgrade cdk-factory
117
+ ```
118
+
119
+ Verify:
120
+ ```bash
121
+ python -c "import cdk_factory; print(cdk_factory.__version__)"
122
+ # Output: 0.8.3
123
+ ```
124
+
125
+ ## Technical Details
126
+
127
+ ### Files Modified
128
+
129
+ **src/cdk_factory/utilities/lambda_function_utilities.py:**
130
+ 1. Added `ignore_patterns()` function in `__validate_directories()`
131
+ - Filters out `__pycache__`, `.pyc`, `.pyo`, `.pytest_cache`, `.mypy_cache`
132
+ - Applied to `shutil.copytree()` operation
133
+
134
+ 2. Modified pip install command
135
+ - Added `--upgrade` flag to force replacement of existing packages
136
+
137
+ **src/cdk_factory/stack_library/api_gateway/api_gateway_stack.py:**
138
+ 1. Enhanced `_setup_single_lambda_route()` naming logic
139
+ - Supports explicit `name` field in route config
140
+ - Auto-generates unique names with HTTP method prefix
141
+
142
+ ### Excluded Patterns
143
+
144
+ The following patterns are now excluded when copying Lambda source code:
145
+ - `__pycache__/` - Python bytecode cache
146
+ - `*.pyc` - Compiled Python files
147
+ - `*.pyo` - Optimized Python files
148
+ - `.pytest_cache/` - Pytest cache
149
+ - `.mypy_cache/` - MyPy cache
150
+
151
+ ## Performance Improvements
152
+
153
+ - **Faster Lambda builds** - Fewer files copied (excludes cache directories)
154
+ - **Smaller Lambda packages** - Build artifacts not included
155
+ - **Cleaner logs** - No pip warnings
156
+
157
+ ## Migration Guide
158
+
159
+ ### No Migration Required
160
+
161
+ This release is 100% backward compatible. Simply upgrade and continue using:
162
+
163
+ ```bash
164
+ pip install --upgrade cdk-factory==0.8.3
165
+ ```
166
+
167
+ ### Optional: Clean Old Build Directories
168
+
169
+ If you want to clean up old build directories manually:
170
+
171
+ ```bash
172
+ # Find temp build directories
173
+ find /tmp/cdk-factory/lambda-builds -type d -name "__pycache__" -exec rm -rf {} +
174
+ find /var/folders -name "cdk-factory" -type d 2>/dev/null
175
+
176
+ # Or remove all Lambda builds
177
+ rm -rf /tmp/cdk-factory/lambda-builds
178
+ rm -rf "$TMPDIR/cdk-factory/lambda-builds"
179
+ ```
180
+
181
+ The next `cdk synth` will create fresh, clean build directories.
182
+
183
+ ## Verification
184
+
185
+ After upgrading, verify the fix:
186
+
187
+ ```bash
188
+ # Deploy or synth
189
+ cdk synth
190
+
191
+ # Should NOT see these warnings anymore:
192
+ # ❌ WARNING: Target directory .../__pycache__ already exists
193
+ # ✅ Clean output
194
+ ```
195
+
196
+ ## Known Issues
197
+
198
+ None
199
+
200
+ ## Contributors
201
+
202
+ - Eric Wilson (@geekcafe)
203
+
204
+ ## Related Issues
205
+
206
+ - Fixes pip warnings during Lambda function builds
207
+ - Improves Lambda package cleanliness
208
+ - Enhances API Gateway route naming flexibility
209
+
210
+ ---
211
+
212
+ ## Summary
213
+
214
+ v0.8.3 is a maintenance release that eliminates annoying pip warnings during Lambda builds and enhances route naming in API Gateway. No breaking changes, just cleaner builds and better DX (Developer Experience).
215
+
216
+ **Key improvements:**
217
+ - ✅ No more `__pycache__` warnings
218
+ - ✅ Cleaner build output
219
+ - ✅ Faster Lambda builds
220
+ - ✅ Better route naming in API Gateway
221
+ - ✅ 100% backward compatible
222
+
223
+ Happy deploying! 🚀
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdk_factory
3
- Version: 0.8.2
3
+ Version: 0.8.4
4
4
  Summary: CDK Factory. A QuickStarter and best practices setup for CDK projects
5
5
  Author-email: Eric Wilson <eric.wilson@geekcafe.com>
6
6
  License: MIT License