aws-cdk-constructs 2.30.4__tar.gz → 2.30.6__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 (73) hide show
  1. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/MANIFEST.in +3 -1
  2. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/PKG-INFO +1 -4
  3. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/__init__.py +1 -1
  4. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/auth_flow.py +5 -5
  5. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/bucket.py +1 -1
  6. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/secret_generator.py +1 -1
  7. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/with_configuration.py +1 -1
  8. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/ecs/fargate_validator.py +5 -5
  9. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/add-index/index.js +2 -0
  10. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/add-index/index.js.map +1 -0
  11. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/check-auth/index.js +3 -0
  12. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/check-auth/index.js.LICENSE.txt +6 -0
  13. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/check-auth/index.js.map +1 -0
  14. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/parse-auth/index.js +3 -0
  15. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/parse-auth/index.js.LICENSE.txt +8 -0
  16. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/parse-auth/index.js.map +1 -0
  17. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/refresh-auth/index.js +3 -0
  18. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/refresh-auth/index.js.LICENSE.txt +8 -0
  19. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/refresh-auth/index.js.map +1 -0
  20. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/secret-generator/index.js +2 -0
  21. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/secret-generator/index.js.map +1 -0
  22. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/sign-out/index.js +3 -0
  23. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/sign-out/index.js.LICENSE.txt +6 -0
  24. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/sign-out/index.js.map +1 -0
  25. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/with_configuration/index.js +3 -0
  26. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/with_configuration/index.js.LICENSE.txt +3 -0
  27. aws_cdk_constructs-2.30.6/aws_cdk_constructs/lambdas/with_configuration/index.js.map +1 -0
  28. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs.egg-info/PKG-INFO +1 -4
  29. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs.egg-info/SOURCES.txt +19 -0
  30. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs.egg-info/requires.txt +1 -0
  31. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/setup.py +1 -0
  32. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/LICENSE.txt +0 -0
  33. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/README.md +0 -0
  34. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/api/__init__.py +0 -0
  35. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/api/api.py +0 -0
  36. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/__init__.py +0 -0
  37. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/base_edge_constructs.py +0 -0
  38. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/configuration.py +0 -0
  39. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/edge_function.py +0 -0
  40. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/edge_role.py +0 -0
  41. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/bucket/log_level.py +0 -0
  42. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/database/__init__.py +0 -0
  43. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/database/_types/__init__.py +0 -0
  44. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/database/_types/document.py +0 -0
  45. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/database/_types/graph.py +0 -0
  46. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/database/_types/relational.py +0 -0
  47. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/database/database.py +0 -0
  48. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/database/types.py +0 -0
  49. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/ecs/__init__.py +0 -0
  50. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/ecs/cluster.py +0 -0
  51. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/ecs/microservice.py +0 -0
  52. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/efs/__init__.py +0 -0
  53. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/efs/volume.py +0 -0
  54. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/load_balancer/__init__.py +0 -0
  55. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/load_balancer/alb.py +0 -0
  56. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/load_balancer/nlb.py +0 -0
  57. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/microservice/__init__.py +0 -0
  58. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/microservice/base_user_data.sh +0 -0
  59. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/microservice/manage_connection_to_nlb_instance_security_group_ingress/lambda_function.js +0 -0
  60. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/microservice/microservice.py +0 -0
  61. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/security_group/__init__.py +0 -0
  62. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/security_group/security_group.py +0 -0
  63. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/service_user_for_iac/__init__.py +0 -0
  64. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/service_user_for_iac/service_user_for_iac.py +0 -0
  65. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/service_user_for_static_assets/__init__.py +0 -0
  66. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/service_user_for_static_assets/service_user_for_static_assets.py +0 -0
  67. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/utils.py +0 -0
  68. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/windows_server/__init__.py +0 -0
  69. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/windows_server/user_data.ps1 +0 -0
  70. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs/windows_server/windows_server.py +0 -0
  71. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs.egg-info/dependency_links.txt +0 -0
  72. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/aws_cdk_constructs.egg-info/top_level.txt +0 -0
  73. {aws_cdk_constructs-2.30.4 → aws_cdk_constructs-2.30.6}/setup.cfg +0 -0
@@ -1,3 +1,5 @@
1
1
  recursive-include aws_cdk_constructs base_user_data.sh
2
2
  recursive-include aws_cdk_constructs user_data.ps1
3
- recursive-include aws_cdk_constructs lambda_function.js
3
+ recursive-include aws_cdk_constructs lambda_function.js
4
+ graft aws_cdk_constructs/lambdas
5
+
@@ -1,12 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws_cdk_constructs
3
- Version: 2.30.4
3
+ Version: 2.30.6
4
4
  Summary: AWS CDK constructs
5
5
  Home-page: https://bitbucket.org/cioapps/aws-cdk-constructs
6
6
  Author: author
7
7
  Author-email: author@foa.org
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
8
  Classifier: Development Status :: 4 - Beta
11
9
  Classifier: Intended Audience :: Developers
12
10
  Classifier: License :: OSI Approved :: Apache Software License
@@ -119,4 +117,3 @@ pip install -r requirements-dev.txt
119
117
  pre-commit install
120
118
  ```
121
119
  This will run the linter and lint all the files under aws_cdk_constructs and tests before each commit. If you see that some files failed the tests, blue will automatically fix them for you. You will only have to stage those files back and commit again.
122
-
@@ -15,4 +15,4 @@ from .load_balancer import Alb, Nlb
15
15
  from .security_group import SecurityGroup
16
16
  from .windows_server import WindowsServer
17
17
 
18
- __version__ = '2.30.4'
18
+ __version__ = '2.30.6'
@@ -78,7 +78,7 @@ class AuthFlow(constructs.Construct):
78
78
  'CheckAuth',
79
79
  name='check-auth',
80
80
  code=aws_lambda.Code.from_asset(
81
- path=os.path.join(dirname, '../../lambda/check-auth/')
81
+ path=os.path.join(dirname, '../lambdas/check-auth/')
82
82
  ),
83
83
  edge_role=self.edge_role,
84
84
  configuration=self.configuration,
@@ -90,7 +90,7 @@ class AuthFlow(constructs.Construct):
90
90
  'ParseAuth',
91
91
  name='parse-auth',
92
92
  code=aws_lambda.Code.from_asset(
93
- path=os.path.join(dirname, '../../lambda/parse-auth/')
93
+ path=os.path.join(dirname, '../lambdas/parse-auth/')
94
94
  ),
95
95
  edge_role=self.edge_role,
96
96
  configuration=self.configuration,
@@ -102,7 +102,7 @@ class AuthFlow(constructs.Construct):
102
102
  'RefreshAuth',
103
103
  name='refresh-auth',
104
104
  code=aws_lambda.Code.from_asset(
105
- path=os.path.join(dirname, '../../lambda/refresh-auth/')
105
+ path=os.path.join(dirname, '../lambdas/refresh-auth/')
106
106
  ),
107
107
  edge_role=self.edge_role,
108
108
  configuration=self.configuration,
@@ -114,7 +114,7 @@ class AuthFlow(constructs.Construct):
114
114
  'SignOut',
115
115
  name='sign-out',
116
116
  code=aws_lambda.Code.from_asset(
117
- path=os.path.join(dirname, '../../lambda/sign-out/')
117
+ path=os.path.join(dirname, '../lambdas/sign-out/')
118
118
  ),
119
119
  edge_role=self.edge_role,
120
120
  configuration=self.configuration,
@@ -129,7 +129,7 @@ class AuthFlow(constructs.Construct):
129
129
  name,
130
130
  name=name,
131
131
  code=aws_lambda.Code.from_asset(
132
- path=os.path.join(dirname, f'../../lambda/{path}')
132
+ path=os.path.join(dirname, f'../lambdas/{path}')
133
133
  ),
134
134
  edge_role=self.edge_role,
135
135
  configuration=self.configuration,
@@ -894,7 +894,7 @@ class Bucket(Construct):
894
894
  'AddIndex',
895
895
  name='add-index',
896
896
  code=aws_lambda.Code.from_asset(
897
- path=os.path.join(dirname, '../../lambda/add-index/')
897
+ path=os.path.join(dirname, '../lambdas/add-index/')
898
898
  ),
899
899
  edge_role=auth_flow.edge_role,
900
900
  configuration=auth_flow.configuration,
@@ -34,7 +34,7 @@ class SecretGenerator(
34
34
  runtime=aws_cdk.aws_lambda.Runtime.NODEJS_18_X,
35
35
  handler='index.handler',
36
36
  code=aws_cdk.aws_lambda.Code.from_asset(
37
- path=os.path.join(dirname, '../../lambda/secret-generator/')
37
+ path=os.path.join(dirname, '../lambdas/secret-generator/')
38
38
  ),
39
39
  )
40
40
 
@@ -39,7 +39,7 @@ class WithConfiguration(Construct):
39
39
  uuid='cloudcomponents-cdk-lambda-at-edge-pattern-with-my-configuration',
40
40
  runtime=aws_lambda.Runtime.NODEJS_18_X,
41
41
  code=aws_lambda.Code.from_asset(
42
- os.path.join(dirname, '../../lambda/with_configuration/')
42
+ os.path.join(dirname, '../lambdas/with_configuration/')
43
43
  ),
44
44
  handler='index.handler',
45
45
  lambda_purpose=resourceType,
@@ -1,6 +1,6 @@
1
1
  import enum
2
2
 
3
- from pydantic import BaseModel, validator
3
+ from pydantic import BaseModel, field_validator
4
4
 
5
5
 
6
6
  class FargateTypes(enum.Enum):
@@ -65,19 +65,19 @@ class FargateValidator(BaseModel):
65
65
  cpu: int
66
66
  mem: int
67
67
 
68
- @validator('cpu')
68
+ @field_validator('cpu')
69
69
  def cpu_must_be_valid(cls, v, values, **kwargs):
70
70
  allowed_cpus = [x.get('cpu') for x in FargateTypes.valid_values.value]
71
71
  if v not in allowed_cpus:
72
72
  raise ValueError(f'Fargate task cpu must be one of {allowed_cpus}')
73
73
  return v
74
74
 
75
- @validator('mem')
75
+ @field_validator('mem')
76
76
  def memory_must_be_valid_for_cpu_setting(cls, v, values, **kwargs):
77
77
  allowed_mems = next(
78
78
  x.get('mem')
79
79
  for x in FargateTypes.valid_values.value
80
- if x.get('cpu') == values.get('cpu')
80
+ if x.get('cpu') == values.data.get('cpu')
81
81
  )
82
82
 
83
83
  if type(allowed_mems) is dict:
@@ -91,6 +91,6 @@ class FargateValidator(BaseModel):
91
91
 
92
92
  if v not in allowed_mems:
93
93
  raise ValueError(
94
- f"Fargate task memory must be one of {allowed_mems} when cpu is {values.get('cpu')}"
94
+ f"Fargate task memory must be one of {allowed_mems} when cpu is {values.data.get('cpu')}"
95
95
  )
96
96
  return v
@@ -0,0 +1,2 @@
1
+ (()=>{"use strict";var n={};({54979:function(n,e){var t=this&&this.__awaiter||function(n,e,t,i){return new(t||(t=Promise))((function(r,o){function u(n){try{d(i.next(n))}catch(n){o(n)}}function c(n){try{d(i.throw(n))}catch(n){o(n)}}function d(n){var e;n.done?r(n.value):(e=n.value,e instanceof t?e:new t((function(n){n(e)}))).then(u,c)}d((i=i.apply(n,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.handler=void 0,e.handler=n=>t(void 0,void 0,void 0,(function*(){const e=n.Records[0].cf.request,t=e.uri;return t.endsWith("/")?e.uri+="index.html":t.includes(".")||(e.uri+="/index.html"),e}))}})[54979](0,n),module.exports=n})();
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-index/index.js","mappings":"uBAGIA,EAAsB,CAAC,G,uZCDd,EAAAC,QACFC,GAC4D,OAAD,6BAC9D,MAAMC,EAAUD,EAAME,QAAQ,GAAGC,GAAGF,QAC9BG,EAAMH,EAAQG,IAWpB,OARIA,EAAIC,SAAS,KACbJ,EAAQG,KAAO,aAGTA,EAAIE,SAAS,OACnBL,EAAQG,KAAO,eAGZH,CACX,G,IDdgB,OAAO,EAAGH,G","sources":["webpack://aws-cdk-constructs/webpack/startup","webpack://aws-cdk-constructs/./lambda-src/add-index/index.ts"],"sourcesContent":["// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[54979](0, __webpack_exports__);\n","import type { CloudFrontRequestEvent, CloudFrontResponseResult, CloudFrontRequestResult } from 'aws-lambda';\n\nexport const handler =\n async (event: CloudFrontRequestEvent):\n Promise<CloudFrontResponseResult | CloudFrontRequestResult> => {\n const request = event.Records[0].cf.request;\n const uri = request.uri;\n\n // Check whether the URI is missing a file name.\n if (uri.endsWith('/')) {\n request.uri += 'index.html';\n }\n // Check whether the URI is missing a file extension.\n else if (!uri.includes('.')) {\n request.uri += '/index.html';\n }\n\n return request;\n }"],"names":["__webpack_exports__","handler","event","request","Records","cf","uri","endsWith","includes"],"sourceRoot":""}