cdk-factory 0.13.1__py3-none-any.whl → 0.13.2__py3-none-any.whl
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/stack_library/lambda_edge/lambda_edge_stack.py +33 -5
- cdk_factory/version.py +1 -1
- {cdk_factory-0.13.1.dist-info → cdk_factory-0.13.2.dist-info}/METADATA +1 -1
- {cdk_factory-0.13.1.dist-info → cdk_factory-0.13.2.dist-info}/RECORD +7 -7
- {cdk_factory-0.13.1.dist-info → cdk_factory-0.13.2.dist-info}/WHEEL +0 -0
- {cdk_factory-0.13.1.dist-info → cdk_factory-0.13.2.dist-info}/entry_points.txt +0 -0
- {cdk_factory-0.13.1.dist-info → cdk_factory-0.13.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -11,6 +11,7 @@ from pathlib import Path
|
|
|
11
11
|
import json
|
|
12
12
|
import tempfile
|
|
13
13
|
import shutil
|
|
14
|
+
import importlib.resources
|
|
14
15
|
|
|
15
16
|
import aws_cdk as cdk
|
|
16
17
|
from aws_cdk import aws_lambda as _lambda
|
|
@@ -128,11 +129,38 @@ class LambdaEdgeStack(IStack, EnhancedSsmParameterMixin):
|
|
|
128
129
|
def _create_lambda_function(self, function_name: str) -> None:
|
|
129
130
|
"""Create the Lambda function"""
|
|
130
131
|
|
|
131
|
-
# Resolve code path
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
# Resolve code path - support package references (e.g., "cdk_factory:lambdas/edge/ip_gate")
|
|
133
|
+
code_path_str = self.edge_config.code_path
|
|
134
|
+
|
|
135
|
+
if ':' in code_path_str:
|
|
136
|
+
# Package reference format: "package_name:path/within/package"
|
|
137
|
+
package_name, package_path = code_path_str.split(':', 1)
|
|
138
|
+
logger.info(f"Resolving package reference: {package_name}:{package_path}")
|
|
139
|
+
|
|
140
|
+
try:
|
|
141
|
+
# Get the package's installed location
|
|
142
|
+
if hasattr(importlib.resources, 'files'):
|
|
143
|
+
# Python 3.9+
|
|
144
|
+
package_root = importlib.resources.files(package_name)
|
|
145
|
+
code_path = Path(str(package_root / package_path))
|
|
146
|
+
else:
|
|
147
|
+
# Fallback for older Python
|
|
148
|
+
import pkg_resources
|
|
149
|
+
package_root = pkg_resources.resource_filename(package_name, '')
|
|
150
|
+
code_path = Path(package_root) / package_path
|
|
151
|
+
|
|
152
|
+
logger.info(f"Resolved package path to: {code_path}")
|
|
153
|
+
except Exception as e:
|
|
154
|
+
raise FileNotFoundError(
|
|
155
|
+
f"Could not resolve package reference '{code_path_str}': {e}\n"
|
|
156
|
+
f"Make sure package '{package_name}' is installed."
|
|
157
|
+
)
|
|
158
|
+
else:
|
|
159
|
+
# Regular file path
|
|
160
|
+
code_path = Path(code_path_str)
|
|
161
|
+
if not code_path.is_absolute():
|
|
162
|
+
# Assume relative to the project root
|
|
163
|
+
code_path = Path.cwd() / code_path
|
|
136
164
|
|
|
137
165
|
if not code_path.exists():
|
|
138
166
|
raise FileNotFoundError(
|
cdk_factory/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.13.
|
|
1
|
+
__version__ = "0.13.2"
|
|
@@ -2,7 +2,7 @@ cdk_factory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
cdk_factory/app.py,sha256=RnX0-pwdTAPAdKJK_j13Zl8anf9zYKBwboR0KA8K8xM,10346
|
|
3
3
|
cdk_factory/cdk.json,sha256=SKZKhJ2PBpFH78j-F8S3VDYW-lf76--Q2I3ON-ZIQfw,3106
|
|
4
4
|
cdk_factory/cli.py,sha256=FGbCTS5dYCNsfp-etshzvFlGDCjC28r6rtzYbe7KoHI,6407
|
|
5
|
-
cdk_factory/version.py,sha256=
|
|
5
|
+
cdk_factory/version.py,sha256=blu6md2c3Nnj5gDBi8U36sYO3k8HcND8s7UoQBjfn3g,23
|
|
6
6
|
cdk_factory/builds/README.md,sha256=9BBWd7bXpyKdMU_g2UljhQwrC9i5O_Tvkb6oPvndoZk,90
|
|
7
7
|
cdk_factory/commands/command_loader.py,sha256=QbLquuP_AdxtlxlDy-2IWCQ6D-7qa58aphnDPtp_uTs,3744
|
|
8
8
|
cdk_factory/configurations/base_config.py,sha256=JKjhNsy0RCUZy1s8n5D_aXXI-upR9izaLtCTfKYiV9k,9624
|
|
@@ -95,7 +95,7 @@ cdk_factory/stack_library/ecr/ecr_stack.py,sha256=1xA68sxFVyqreYjXrP_7U9I8RF9RtF
|
|
|
95
95
|
cdk_factory/stack_library/ecs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
96
|
cdk_factory/stack_library/ecs/ecs_service_stack.py,sha256=zuGdZEP5KmeVDTJb-H47LYhvs-85-Fi4Xb78nsA-lF4,24685
|
|
97
97
|
cdk_factory/stack_library/lambda_edge/__init__.py,sha256=ByBJ_CWdc4UtTmFBZH-6pzBMNkjkdtE65AmnB0Fs6lM,156
|
|
98
|
-
cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py,sha256=
|
|
98
|
+
cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py,sha256=fCnS_WFUwe9gyvsqrevevrDcUqZpZgnwM8v9tQVxFzk,15491
|
|
99
99
|
cdk_factory/stack_library/load_balancer/__init__.py,sha256=wZpKw2OecLJGdF5mPayCYAEhu2H3c2gJFFIxwXftGDU,52
|
|
100
100
|
cdk_factory/stack_library/load_balancer/load_balancer_stack.py,sha256=t5JUe5lMUbQCRFZR08k8nO-g-53yWY8gKB9v8ZnedBs,24391
|
|
101
101
|
cdk_factory/stack_library/monitoring/__init__.py,sha256=k1G_KDx47Aw0UugaL99PN_TKlyLK4nkJVApCaAK7GJg,153
|
|
@@ -129,8 +129,8 @@ cdk_factory/utilities/lambda_function_utilities.py,sha256=S1GvBsY_q2cyUiaud3HORJ
|
|
|
129
129
|
cdk_factory/utilities/os_execute.py,sha256=5Op0LY_8Y-pUm04y1k8MTpNrmQvcLmQHPQITEP7EuSU,1019
|
|
130
130
|
cdk_factory/utils/api_gateway_utilities.py,sha256=If7Xu5s_UxmuV-kL3JkXxPLBdSVUKoLtohm0IUFoiV8,4378
|
|
131
131
|
cdk_factory/workload/workload_factory.py,sha256=mM8GU_5mKq_0OyK060T3JrUSUiGAcKf0eqNlT9mfaws,6028
|
|
132
|
-
cdk_factory-0.13.
|
|
133
|
-
cdk_factory-0.13.
|
|
134
|
-
cdk_factory-0.13.
|
|
135
|
-
cdk_factory-0.13.
|
|
136
|
-
cdk_factory-0.13.
|
|
132
|
+
cdk_factory-0.13.2.dist-info/METADATA,sha256=LyiWwDWEaFep_Koxoo46zUxv3Lza_88v4T45EK7zNeg,2451
|
|
133
|
+
cdk_factory-0.13.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
134
|
+
cdk_factory-0.13.2.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
|
|
135
|
+
cdk_factory-0.13.2.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
|
|
136
|
+
cdk_factory-0.13.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|