@mavogel/awscdk-rootmail 0.0.17 → 0.0.19
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.
- package/.jsii +57 -19
- package/API.md +117 -2
- package/README.md +91 -2
- package/docs/img/cloudformation-tpl-min.png +0 -0
- package/integ-tests/functions/custom-ses-receive-function.ts +92 -0
- package/integ-tests/integ.rootmail-custom-santa.ts +143 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/RootmailIntegTestStack.assets.json +162 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/RootmailIntegTestStack.template.json +4541 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.assets.json +32 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.template.json +249 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.0649b5bfaa322d6bd173d2daef3177389cf0778b556b300ac6bf451704cc3a49/index.js +37981 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.157ba1713f7224463b621261792d18081588ff306a9bc3f75e6c468fabbe1a60/index.js +106 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.4c079063901e6478dbb5ace19e3123641ebf0da2ab648ecf52079c5bec154196/index.js +215 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.53e8368959effe94a6e51bef9c7c5bf0eaf5c4d64eece81632ca62aa34517978.bundle/index.js +31981 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e/index.d.ts +14 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e/index.js +1 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.78b64aaf9aebb4eacbdd42197be10e9d5894360a642f7dcf79aeb84bb3552377/index.js +61 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.7e8a681794eff5fda1841caa360113df5488ecf944055a69b8f1e5a687e269f5/index.js +83 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.9572b451243318765beb576ae7528096b3879783dbaab795c02c01d7f4e83438/index.js +47 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.b8448324ef2c7d5bfa362722df2d397079d5aabaae2749f09180ac5bedfa5c89/index.js +105 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.d2b520d86fd9d964c83dc0d5ce2e4456dbde5fa7ae0c791a71865cbdfe2fb855/index.js +85 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/cfn-response.js +1 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/consts.js +1 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/framework.js +3 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/outbound.js +1 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/util.js +1 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f9b17c134d24cf60e1d26c033b5f4f247b759149619ac0aac341b950a10ccf14/index.js +72 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/integ.json +27 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/manifest.json +742 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/tree.json +5893 -0
- package/integ-tests/integ.rootmail.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.assets.json +2 -2
- package/integ-tests/integ.rootmail.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.template.json +3 -3
- package/integ-tests/integ.rootmail.ts.snapshot/manifest.json +1 -1
- package/lib/index-cli-synth.js +22 -11
- package/lib/index.js +2 -1
- package/lib/rootmail.d.ts +5 -1
- package/lib/rootmail.js +3 -2
- package/lib/scripts/publish-assets.js +18 -22
- package/lib/ses-receive.d.ts +5 -1
- package/lib/ses-receive.js +36 -14
- package/package.json +11 -6
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "33.0.0",
|
|
3
|
+
"files": {
|
|
4
|
+
"53e8368959effe94a6e51bef9c7c5bf0eaf5c4d64eece81632ca62aa34517978": {
|
|
5
|
+
"source": {
|
|
6
|
+
"path": "asset.53e8368959effe94a6e51bef9c7c5bf0eaf5c4d64eece81632ca62aa34517978.bundle",
|
|
7
|
+
"packaging": "zip"
|
|
8
|
+
},
|
|
9
|
+
"destinations": {
|
|
10
|
+
"current_account-current_region": {
|
|
11
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
12
|
+
"objectKey": "53e8368959effe94a6e51bef9c7c5bf0eaf5c4d64eece81632ca62aa34517978.zip",
|
|
13
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"bd5ca416acdf7bc9e351216c8692216e8915fa78d41070fc8e5bded880b1f738": {
|
|
18
|
+
"source": {
|
|
19
|
+
"path": "SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.template.json",
|
|
20
|
+
"packaging": "file"
|
|
21
|
+
},
|
|
22
|
+
"destinations": {
|
|
23
|
+
"current_account-current_region": {
|
|
24
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
25
|
+
"objectKey": "bd5ca416acdf7bc9e351216c8692216e8915fa78d41070fc8e5bded880b1f738.json",
|
|
26
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"dockerImages": {}
|
|
32
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Resources": {
|
|
3
|
+
"LambdaInvoke8535566be63cb52d07c1283fc6f6e307": {
|
|
4
|
+
"Type": "Custom::DeployAssert@SdkCallLambdainvoke",
|
|
5
|
+
"Properties": {
|
|
6
|
+
"ServiceToken": {
|
|
7
|
+
"Fn::GetAtt": [
|
|
8
|
+
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
|
|
9
|
+
"Arn"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"service": "Lambda",
|
|
13
|
+
"api": "invoke",
|
|
14
|
+
"expected": "{\"$ObjectLike\":{\"Payload\":{\"sendStatusCode\":200}}}",
|
|
15
|
+
"parameters": {
|
|
16
|
+
"FunctionName": {
|
|
17
|
+
"Fn::Join": [
|
|
18
|
+
"",
|
|
19
|
+
[
|
|
20
|
+
"\"",
|
|
21
|
+
{
|
|
22
|
+
"Fn::ImportValue": "RootmailIntegTestStack:ExportsOutputRefsendemailhandler05B16DE5F96FA757"
|
|
23
|
+
},
|
|
24
|
+
"\""
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"InvocationType": "\"RequestResponse\"",
|
|
29
|
+
"LogType": "\"Tail\"",
|
|
30
|
+
"Payload": {
|
|
31
|
+
"Fn::Join": [
|
|
32
|
+
"",
|
|
33
|
+
[
|
|
34
|
+
"\"{\\\"id\\\":\\\"test-id-c23qgsa2\\\",\\\"text\\\":\\\"This is a mail body\\\",\\\"sourceMail\\\":\\\"test@c23qgsa2-",
|
|
35
|
+
{
|
|
36
|
+
"Ref": "AWS::Region"
|
|
37
|
+
},
|
|
38
|
+
".rootmail-test.mavogel.xyz\\\",\\\"toMail\\\":\\\"root+test-id-c23qgsa2@c23qgsa2-",
|
|
39
|
+
{
|
|
40
|
+
"Ref": "AWS::Region"
|
|
41
|
+
},
|
|
42
|
+
".rootmail-test.mavogel.xyz\\\"}\""
|
|
43
|
+
]
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"flattenResponse": "false",
|
|
48
|
+
"salt": "1708190598169"
|
|
49
|
+
},
|
|
50
|
+
"DependsOn": [
|
|
51
|
+
"AwsApiCallSSMgetParameterd4c847c906a9dd9484fbf0d62db16d9b"
|
|
52
|
+
],
|
|
53
|
+
"UpdateReplacePolicy": "Delete",
|
|
54
|
+
"DeletionPolicy": "Delete"
|
|
55
|
+
},
|
|
56
|
+
"LambdaInvoke8535566be63cb52d07c1283fc6f6e307Invoke7095813B": {
|
|
57
|
+
"Type": "AWS::Lambda::Permission",
|
|
58
|
+
"Properties": {
|
|
59
|
+
"Action": "lambda:InvokeFunction",
|
|
60
|
+
"FunctionName": {
|
|
61
|
+
"Fn::ImportValue": "RootmailIntegTestStack:ExportsOutputRefsendemailhandler05B16DE5F96FA757"
|
|
62
|
+
},
|
|
63
|
+
"Principal": {
|
|
64
|
+
"Fn::GetAtt": [
|
|
65
|
+
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73",
|
|
66
|
+
"Arn"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"DependsOn": [
|
|
71
|
+
"AwsApiCallSSMgetParameterd4c847c906a9dd9484fbf0d62db16d9b"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": {
|
|
75
|
+
"Type": "AWS::IAM::Role",
|
|
76
|
+
"Properties": {
|
|
77
|
+
"AssumeRolePolicyDocument": {
|
|
78
|
+
"Version": "2012-10-17",
|
|
79
|
+
"Statement": [
|
|
80
|
+
{
|
|
81
|
+
"Action": "sts:AssumeRole",
|
|
82
|
+
"Effect": "Allow",
|
|
83
|
+
"Principal": {
|
|
84
|
+
"Service": "lambda.amazonaws.com"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"ManagedPolicyArns": [
|
|
90
|
+
{
|
|
91
|
+
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"Policies": [
|
|
95
|
+
{
|
|
96
|
+
"PolicyName": "Inline",
|
|
97
|
+
"PolicyDocument": {
|
|
98
|
+
"Version": "2012-10-17",
|
|
99
|
+
"Statement": [
|
|
100
|
+
{
|
|
101
|
+
"Action": [
|
|
102
|
+
"lambda:Invoke"
|
|
103
|
+
],
|
|
104
|
+
"Effect": "Allow",
|
|
105
|
+
"Resource": [
|
|
106
|
+
"*"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"Action": [
|
|
111
|
+
"lambda:InvokeFunction"
|
|
112
|
+
],
|
|
113
|
+
"Effect": "Allow",
|
|
114
|
+
"Resource": [
|
|
115
|
+
{
|
|
116
|
+
"Fn::Join": [
|
|
117
|
+
"",
|
|
118
|
+
[
|
|
119
|
+
"arn:",
|
|
120
|
+
{
|
|
121
|
+
"Ref": "AWS::Partition"
|
|
122
|
+
},
|
|
123
|
+
":lambda:",
|
|
124
|
+
{
|
|
125
|
+
"Ref": "AWS::Region"
|
|
126
|
+
},
|
|
127
|
+
":",
|
|
128
|
+
{
|
|
129
|
+
"Ref": "AWS::AccountId"
|
|
130
|
+
},
|
|
131
|
+
":function:",
|
|
132
|
+
{
|
|
133
|
+
"Fn::ImportValue": "RootmailIntegTestStack:ExportsOutputRefsendemailhandler05B16DE5F96FA757"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"Action": [
|
|
142
|
+
"ssm:GetParameter"
|
|
143
|
+
],
|
|
144
|
+
"Effect": "Allow",
|
|
145
|
+
"Resource": [
|
|
146
|
+
"*"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": {
|
|
156
|
+
"Type": "AWS::Lambda::Function",
|
|
157
|
+
"Properties": {
|
|
158
|
+
"Runtime": "nodejs18.x",
|
|
159
|
+
"Code": {
|
|
160
|
+
"S3Bucket": {
|
|
161
|
+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
162
|
+
},
|
|
163
|
+
"S3Key": "53e8368959effe94a6e51bef9c7c5bf0eaf5c4d64eece81632ca62aa34517978.zip"
|
|
164
|
+
},
|
|
165
|
+
"Timeout": 120,
|
|
166
|
+
"Handler": "index.handler",
|
|
167
|
+
"Role": {
|
|
168
|
+
"Fn::GetAtt": [
|
|
169
|
+
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73",
|
|
170
|
+
"Arn"
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"AwsApiCallSSMgetParameterd4c847c906a9dd9484fbf0d62db16d9b": {
|
|
176
|
+
"Type": "Custom::DeployAssert@SdkCallSSMgetParameter",
|
|
177
|
+
"Properties": {
|
|
178
|
+
"ServiceToken": {
|
|
179
|
+
"Fn::GetAtt": [
|
|
180
|
+
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
|
|
181
|
+
"Arn"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"service": "SSM",
|
|
185
|
+
"api": "getParameter",
|
|
186
|
+
"expected": "{\"$ObjectLike\":{\"Parameter\":{\"Name\":\"/rootmail/domain_name_servers\",\"Type\":\"StringList\"}}}",
|
|
187
|
+
"parameters": {
|
|
188
|
+
"Name": "\"/rootmail/domain_name_servers\""
|
|
189
|
+
},
|
|
190
|
+
"flattenResponse": "false",
|
|
191
|
+
"salt": "1708190598169"
|
|
192
|
+
},
|
|
193
|
+
"UpdateReplacePolicy": "Delete",
|
|
194
|
+
"DeletionPolicy": "Delete"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"Outputs": {
|
|
198
|
+
"AssertionResultsLambdaInvoke8535566be63cb52d07c1283fc6f6e307": {
|
|
199
|
+
"Value": {
|
|
200
|
+
"Fn::GetAtt": [
|
|
201
|
+
"LambdaInvoke8535566be63cb52d07c1283fc6f6e307",
|
|
202
|
+
"assertion"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"AssertionResultsAwsApiCallSSMgetParameterd4c847c906a9dd9484fbf0d62db16d9b": {
|
|
207
|
+
"Value": {
|
|
208
|
+
"Fn::GetAtt": [
|
|
209
|
+
"AwsApiCallSSMgetParameterd4c847c906a9dd9484fbf0d62db16d9b",
|
|
210
|
+
"assertion"
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"Parameters": {
|
|
216
|
+
"BootstrapVersion": {
|
|
217
|
+
"Type": "AWS::SSM::Parameter::Value<String>",
|
|
218
|
+
"Default": "/cdk-bootstrap/hnb659fds/version",
|
|
219
|
+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"Rules": {
|
|
223
|
+
"CheckBootstrapVersion": {
|
|
224
|
+
"Assertions": [
|
|
225
|
+
{
|
|
226
|
+
"Assert": {
|
|
227
|
+
"Fn::Not": [
|
|
228
|
+
{
|
|
229
|
+
"Fn::Contains": [
|
|
230
|
+
[
|
|
231
|
+
"1",
|
|
232
|
+
"2",
|
|
233
|
+
"3",
|
|
234
|
+
"4",
|
|
235
|
+
"5"
|
|
236
|
+
],
|
|
237
|
+
{
|
|
238
|
+
"Ref": "BootstrapVersion"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|