aws-cdk-constructs 2.31.2__tar.gz → 2.31.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.
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/PKG-INFO +1 -1
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/__init__.py +1 -1
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/bucket.py +22 -20
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/ecs/microservice.py +22 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs.egg-info/PKG-INFO +1 -1
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/LICENSE.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/MANIFEST.in +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/README.md +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/api/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/api/api.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/auth_flow.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/base_edge_constructs.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/configuration.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/edge_function.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/edge_role.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/log_level.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/secret_generator.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/with_configuration.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/_types/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/_types/document.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/_types/graph.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/_types/relational.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/database.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/types.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/ecs/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/ecs/cluster.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/ecs/fargate_validator.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/efs/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/efs/volume.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/add-index/index.js +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/add-index/index.js.map +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/check-auth/index.js +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/check-auth/index.js.LICENSE.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/check-auth/index.js.map +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/parse-auth/index.js +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/parse-auth/index.js.LICENSE.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/parse-auth/index.js.map +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/refresh-auth/index.js +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/refresh-auth/index.js.LICENSE.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/refresh-auth/index.js.map +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/secret-generator/index.js +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/secret-generator/index.js.map +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/sign-out/index.js +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/sign-out/index.js.LICENSE.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/sign-out/index.js.map +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/with_configuration/index.js +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/with_configuration/index.js.LICENSE.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/with_configuration/index.js.map +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/load_balancer/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/load_balancer/alb.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/load_balancer/nlb.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/microservice/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/microservice/base_user_data.sh +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/microservice/manage_connection_to_nlb_instance_security_group_ingress/lambda_function.js +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/microservice/microservice.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/security_group/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/security_group/security_group.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/service_user_for_iac/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/service_user_for_iac/service_user_for_iac.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/service_user_for_static_assets/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/service_user_for_static_assets/service_user_for_static_assets.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/utils.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/windows_server/__init__.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/windows_server/user_data.ps1 +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/windows_server/windows_server.py +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs.egg-info/SOURCES.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs.egg-info/dependency_links.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs.egg-info/requires.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs.egg-info/top_level.txt +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/setup.cfg +0 -0
- {aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/setup.py +0 -0
|
@@ -846,12 +846,24 @@ class Bucket(Construct):
|
|
|
846
846
|
refresh_auth = auth_flow.refresh_auth.edge_lambda
|
|
847
847
|
sign_out = auth_flow.sign_out.edge_lambda
|
|
848
848
|
|
|
849
|
+
add_index_edge_function = EdgeFunction(
|
|
850
|
+
self,
|
|
851
|
+
'AddIndex',
|
|
852
|
+
name='add-index',
|
|
853
|
+
code=aws_lambda.Code.from_asset(
|
|
854
|
+
path=os.path.join(dirname, '../lambdas/add-index/')
|
|
855
|
+
),
|
|
856
|
+
edge_role=auth_flow.edge_role,
|
|
857
|
+
configuration=auth_flow.configuration,
|
|
858
|
+
event_type=aws_cloudfront.LambdaEdgeEventType.ORIGIN_REQUEST,
|
|
859
|
+
)
|
|
860
|
+
|
|
849
861
|
default_behavior = _cloudfront.BehaviorOptions(
|
|
850
862
|
origin=origin,
|
|
851
863
|
compress=True,
|
|
852
864
|
origin_request_policy=None,
|
|
853
865
|
viewer_protocol_policy=_cloudfront.ViewerProtocolPolicy.HTTPS_ONLY,
|
|
854
|
-
edge_lambdas=[check_auth],
|
|
866
|
+
edge_lambdas=[add_index_edge_function.edge_lambda, check_auth],
|
|
855
867
|
cache_policy=_cloudfront.CachePolicy.CACHING_DISABLED,
|
|
856
868
|
response_headers_policy=response_headers_policy,
|
|
857
869
|
)
|
|
@@ -892,24 +904,14 @@ class Bucket(Construct):
|
|
|
892
904
|
)
|
|
893
905
|
|
|
894
906
|
# Add /index.html when not present
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
event_type=aws_cloudfront.LambdaEdgeEventType.VIEWER_REQUEST,
|
|
905
|
-
)
|
|
906
|
-
self._cloudfront_distribution.add_behavior(
|
|
907
|
-
'/*',
|
|
908
|
-
origin,
|
|
909
|
-
compress=True,
|
|
910
|
-
# origin_request_policy=_cloudfront.OriginRequestPolicy.ALL_VIEWER,
|
|
911
|
-
viewer_protocol_policy=_cloudfront.ViewerProtocolPolicy.HTTPS_ONLY,
|
|
912
|
-
edge_lambdas=[add_index_edge_function.edge_lambda],
|
|
913
|
-
)
|
|
907
|
+
|
|
908
|
+
# self._cloudfront_distribution.add_behavior(
|
|
909
|
+
# '/*',
|
|
910
|
+
# origin,
|
|
911
|
+
# compress=True,
|
|
912
|
+
# # origin_request_policy=_cloudfront.OriginRequestPolicy.ALL_VIEWER,
|
|
913
|
+
# viewer_protocol_policy=_cloudfront.ViewerProtocolPolicy.HTTPS_ONLY,
|
|
914
|
+
# edge_lambdas=[add_index_edge_function.edge_lambda],
|
|
915
|
+
# )
|
|
914
916
|
|
|
915
917
|
self.update_distribution_origin_access()
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/ecs/microservice.py
RENAMED
|
@@ -6,6 +6,7 @@ from typing import Optional, List, Dict, TYPE_CHECKING
|
|
|
6
6
|
from aws_cdk import (
|
|
7
7
|
Tags,
|
|
8
8
|
Duration,
|
|
9
|
+
Size,
|
|
9
10
|
aws_ec2 as _ec2,
|
|
10
11
|
aws_ecs as _ecs,
|
|
11
12
|
aws_ecr as _ecr,
|
|
@@ -100,6 +101,10 @@ class ECSMicroservice(Construct):
|
|
|
100
101
|
|
|
101
102
|
omit_cloudformation_template_outputs(bool): Omit the generation of CloudFormation template outputs. Default: false
|
|
102
103
|
|
|
104
|
+
log_driver_blocking_mode (bool): Whet set to true if the logs destination stops working, the application will be blocked. When set to False, the logs will be lost but the application keeps working. Default: false
|
|
105
|
+
|
|
106
|
+
max_buffer_size_mib (int): The size (mebibytes) of the buffer when log_driver_blocking_mode is set to false. Default: 4
|
|
107
|
+
|
|
103
108
|
"""
|
|
104
109
|
|
|
105
110
|
def __init__(
|
|
@@ -132,6 +137,8 @@ class ECSMicroservice(Construct):
|
|
|
132
137
|
internal: bool = False,
|
|
133
138
|
alternative_fqdns: list[str] = [],
|
|
134
139
|
omit_cloudformation_template_outputs: bool = False,
|
|
140
|
+
log_driver_blocking_mode: bool = False,
|
|
141
|
+
max_buffer_size_mib: int = 4,
|
|
135
142
|
) -> None:
|
|
136
143
|
self.scope = scope
|
|
137
144
|
self.id = name
|
|
@@ -156,6 +163,17 @@ class ECSMicroservice(Construct):
|
|
|
156
163
|
self.cpu_threshold = cpu_threshold
|
|
157
164
|
self.environments_parameters = self.cluster.environments_parameters
|
|
158
165
|
self.environment = self.cluster.environment
|
|
166
|
+
self.log_driver_blocking_mode = log_driver_blocking_mode
|
|
167
|
+
self.max_buffer_size_mib = max_buffer_size_mib
|
|
168
|
+
|
|
169
|
+
if not log_driver_blocking_mode:
|
|
170
|
+
# Configure ECS logging in non-blocking mode and the buffer size when the log_driver_blocking_mode is set to False (default value)
|
|
171
|
+
self.log_driver_mode = _ecs.AwsLogDriverMode.NON_BLOCKING
|
|
172
|
+
self.max_buffer_size = Size.mebibytes(self.max_buffer_size_mib)
|
|
173
|
+
else:
|
|
174
|
+
# Configure ECS logging in blocking mode and remove the buffer when the log_driver_blocking_mode is set to True
|
|
175
|
+
self.log_driver_mode = _ecs.AwsLogDriverMode.BLOCKING
|
|
176
|
+
self.max_buffer_size = None
|
|
159
177
|
|
|
160
178
|
super().__init__(scope, name)
|
|
161
179
|
FargateValidator(cpu=self.cpu, mem=self.memory_limit_mib)
|
|
@@ -308,6 +326,8 @@ class ECSMicroservice(Construct):
|
|
|
308
326
|
logging=_ecs.LogDriver.aws_logs(
|
|
309
327
|
stream_prefix=self.id + '-main-container',
|
|
310
328
|
log_retention=_logs.RetentionDays.ONE_WEEK,
|
|
329
|
+
mode=self.log_driver_mode,
|
|
330
|
+
max_buffer_size=self.max_buffer_size,
|
|
311
331
|
),
|
|
312
332
|
environment=self.container_env,
|
|
313
333
|
entry_point=self.entry_point,
|
|
@@ -387,6 +407,8 @@ class ECSMicroservice(Construct):
|
|
|
387
407
|
logging=_ecs.LogDriver.aws_logs(
|
|
388
408
|
stream_prefix=f'{self.id}-{name}-init-container',
|
|
389
409
|
log_retention=_logs.RetentionDays.ONE_WEEK,
|
|
410
|
+
mode=self.log_driver_mode,
|
|
411
|
+
max_buffer_size=self.max_buffer_size,
|
|
390
412
|
),
|
|
391
413
|
)
|
|
392
414
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/__init__.py
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/auth_flow.py
RENAMED
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/configuration.py
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/edge_function.py
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/edge_role.py
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/bucket/log_level.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/_types/graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/database.py
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/database/types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/ecs/fargate_validator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/lambdas/sign-out/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/load_balancer/__init__.py
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/load_balancer/alb.py
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/load_balancer/nlb.py
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs/microservice/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs.egg-info/requires.txt
RENAMED
|
File without changes
|
{aws_cdk_constructs-2.31.2 → aws_cdk_constructs-2.31.4}/aws_cdk_constructs.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|