@mavogel/awscdk-rootmail 0.0.214 → 0.0.215
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 +26 -8
- package/API.md +14 -0
- package/CONTRIBUTING.md +3 -3
- package/README.md +3 -3
- package/integ-tests/README.md +11 -4
- package/integ-tests/common.ts +2 -0
- package/integ-tests/create-e2e-cfn-stack.bash +35 -0
- package/integ-tests/delete-e2e-cfn-stack.bash +26 -0
- package/integ-tests/integ.rootmail-custom-santa.ts +1 -2
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/RootmailIntegTestStack.assets.json +8 -8
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/RootmailIntegTestStack.template.json +4 -4
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.assets.json +2 -2
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.template.json +2 -2
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/{asset.0649b5bfaa322d6bd173d2daef3177389cf0778b556b300ac6bf451704cc3a49 → asset.97724f55c990db7c62d85b80d4afb032e60011490da173e3551e6a131013b79d}/index.js +17458 -464
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/{asset.f9b17c134d24cf60e1d26c033b5f4f247b759149619ac0aac341b950a10ccf14 → asset.f75274dd7677b6ef41f29d2dfc2c885b4f4e069d3fb8e67636bd89efd3f0fcad}/index.js +2 -0
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/integ.json +1 -1
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/manifest.json +2 -2
- package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/tree.json +3 -3
- package/integ-tests/integ.rootmail.ts +1 -2
- package/integ-tests/integ.rootmail.ts.snapshot/RootmailIntegTestStack.assets.json +8 -8
- package/integ-tests/integ.rootmail.ts.snapshot/RootmailIntegTestStack.template.json +4 -4
- 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/{asset.de67316e819b929cc1aa19838de373be5c9ede7a11e8132fabd28dbc730a92fd → asset.3fe096136c1d1292627baeb9b860b3206032deebb5a03ea407d7d04833a222d7}/index.js +17489 -474
- package/integ-tests/integ.rootmail.ts.snapshot/{asset.f9b17c134d24cf60e1d26c033b5f4f247b759149619ac0aac341b950a10ccf14 → asset.f75274dd7677b6ef41f29d2dfc2c885b4f4e069d3fb8e67636bd89efd3f0fcad}/index.js +2 -0
- package/integ-tests/integ.rootmail.ts.snapshot/integ.json +1 -1
- package/integ-tests/integ.rootmail.ts.snapshot/manifest.json +2 -2
- package/integ-tests/integ.rootmail.ts.snapshot/tree.json +3 -3
- package/lib/rootmail.d.ts +7 -1
- package/lib/rootmail.js +4 -2
- package/lib/ses-receive.js +1 -1
- package/lib/ses-receive.ops-santa-handler.js +32 -11
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -3522,7 +3522,7 @@
|
|
|
3522
3522
|
},
|
|
3523
3523
|
"name": "@mavogel/awscdk-rootmail",
|
|
3524
3524
|
"readme": {
|
|
3525
|
-
"markdown": "# awscdk-rootmail\n\nA single rootmail box for all your AWS accounts. The cdk implementation and **adaption** of the [superwerker](https://superwerker.cloud/) rootmail feature. See [here](docs/adrs/rootmail.md) for a detailed Architectural Decision Record ([ADR](https://adr.github.io/))\n\n- [TL;DR](#tldr)\n- [Usage](#usage)\n - [Dependencies](#dependencies)\n - [Deploy](#deploy)\n - [CDK](#cdk)\n - [Cloudformation](#cloudformation)\n- [Solution design: Version 1 - Domain in the same AWS account](#solution-design-version-1---domain-in-the-same-aws-account)\n- [Solution design: Version 2 - external DNS provider](#solution-design-version-2---external-dns-provider)\n- [Uninstall](#uninstall)\n- [Known issues](#known-issues)\n- [Related projects](#related-projects)\n\n## TL;DR\nEach AWS account needs one unique email address (the so-called \"AWS account root user email address\").\n\nAccess to these email addresses must be adequately secured since they provide privileged access to AWS accounts, such as account deletion procedures.\n\nThis is why you only need 1 mailing list for the AWS Management (formerly *root*) account,\nwe recommend the following pattern `aws-roots+<uuid>@mycompany.test`\n\n> [!NOTE]\n> Maximum **64** characters are allowed for the whole address.\n\nAnd as you own the domain `mycompany.test` you can add a subdomain, e.g. `aws`, for which all EMails will then be received with this solution within this particular AWS Management account.\n\n## Usage\n### Dependencies\nAdministrative access to an AWS account and the following tools:\n```sh\nbrew install aws-cli node@18 esbuild\n```\n\n<details>\n <summary>... or a longer listing</summary>\n\n- Access to a development environment. It is recommended to use AWS Cloud9 to avoid having to set up the tools needed to deploy the solution. See [Getting started with AWS Cloud9](https://aws.amazon.com/cloud9/getting-started/).\n- Using Cloud9, all of the following have already been configured for you. If you choose not to use Cloud9, you will need to install the following.\n - AWS CLI. See [Installing, updating and uninstalling the AWS CLI version 2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)\n - Set up the AWS CLI with IAM access credentials. See [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n - Node.js version 10.13.0 or later\n - AWS CDK version 2.90.0 or later. For installation instructions see [Getting Started with the AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_install)\n - Docker version 20.10.x or later **OR** [esbuild](https://esbuild.github.io/)\n</details>\n\n### Deploy\nYou can chose via embedding the construct in your cdk-app or use is directly via Cloudformation.\n#### CDK\n1. To start a new project we recommend using [projen](https://projen.io/).\n 1. Create a new projen project\n ```sh\n npx projen new awscdk-app-ts\n ```\n 2. Add `@mavogel/awscdk-rootmail` as a dependency to your project in the `.projenrc.ts` file\n 3. Run `npm run projen` to install it\n2. In you `main.ts` file add the following code\n```ts\nimport { Rootmail } from '@mavogel/awscdk-rootmail';\nimport {\n App,\n Stack,\n StackProps,\n aws_route53 as r53,\n} from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n const domain = 'mycompany.com'\n\n const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {\n domainName: domain,\n });\n\n new Rootmail(this, 'rootmail', {\n // 1. a domain you own, registered via Route53 in the SAME account\n domain: domain,\n // 2. so the subdomain will be aws.mycompany.test and\n subdomain: 'aws',\n // 3. wired / delegated automatically to\n wireDNSToHostedZoneID: hostedZone.hostedZoneId,\n });\n }\n}\n```\n2. run on your commandline\n```sh\nnpm run deploy\n```\n1. No need to do anything, the NS records are **automatically** propagated as the parent Hosted Zone is in the same account!\n2. The `hosted-zone-dkim-propagation-provider.is-complete-handler` Lambda function checks every 10 seconds if the DNS for the subdomain is propagated. Details are in the Cloudwatch log group.\n\n### CDK with your own receiver function\nYou might also want to pass in you own function on what to do when an EMail is received\n\nfile `functions/custom-ses-receive-function.ts` which gets the 2 environment variables populated\n- `EMAIL_BUCKET`\n- `EMAIL_BUCKET_ARN`\n\nas well as `s3:GetObject` on the `RootMail/*` objects in the created Rootmail `S3` bucket.\n\n```ts\nimport { S3 } from '@aws-sdk/client-s3';\nimport { ParsedMail, simpleParser } from 'mailparser';\n// populated by default\nconst emailBucket = process.env.EMAIL_BUCKET;\nconst emailBucketArn = process.env.EMAIL_BUCKET_ARN;\nconst s3 = new S3();\n\n// SESEventRecordsToLambda\n// from https://docs.aws.amazon.com/ses/latest/dg/receiving-email-action-lambda-event.html\nexport const handler = async (event: SESEventRecordsToLambda) => {\n for (const record of event.Records) {\n\n const id = record.ses.mail.messageId;\n const key = `RootMail/${id}`;\n const response = await s3.getObject({ Bucket: emailBucket as string, Key: key });\n\n const msg: ParsedMail = await simpleParser(response.Body as unknown as Buffer);\n\n let title = msg.subject;\n console.log(`Title: ${title} from emailBucketArn: ${emailBucketArn}`);\n // use the content of the email body\n const body = msg.html;\n // add your custom code here ...\n\n // dummy example: list s3 buckets\n const buckets = await s3.listBuckets({});\n if (!buckets.Buckets) {\n console.log('No buckets found');\n return;\n }\n console.log('Buckets:');\n for (const bucket of buckets.Buckets || []) {\n console.log(bucket.Name);\n }\n }\n\n};\n```\nand you create a separate `NodejsFunction` as follows with the additionally needed IAM permissions:\n```ts\nconst customSesReceiveFunction = new NodejsFunction(stackUnderTest, 'custom-ses-receive-function', {\n functionName: PhysicalName.GENERATE_IF_NEEDED,\n entry: path.join(__dirname, 'functions', 'custom-ses-receive-function.ts'),\n runtime: lambda.Runtime.NODEJS_18_X,\n logRetention: 1,\n timeout: Duration.seconds(30),\n});\n\n// Note: any additional permissions you need to add to the function yourself!\ncustomSesReceiveFunction.addToRolePolicy(new iam.PolicyStatement({\n actions: [\n 's3:List*',\n ],\n resources: ['*'],\n}))\n```\nand then pass it into the `Rootmail` Stack\n```ts\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n const domain = 'mycompany.test'\n const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {\n domainName: domain,\n });\n\n const rootmail = new Rootmail(this, 'rootmail-stack', {\n domain: domain;\n autowireDNSParentHostedZoneID: hostedZone.hostedZoneId,\n env: {\n region: 'eu-west-1',\n },\n customSesReceiveFunction: customSesReceiveFunction, // <- pass it in here\n });\n }\n}\n```\n\n#### Cloudformation\nor use it directly a Cloudformation template `yaml` from the URL [here](https://mvc-test4-bucket-eu-west-1.s3.eu-west-1.amazonaws.com/rootmail/0.0.13-DEVELOPMENT/rootmailStack.template.yaml).\n\n\n<details>\n <summary>... click to expand</summary>\n\nand fill out the parameters\n\n\n</details>\n\n## Solution design: Version 1 - Domain in the same AWS account\n\n\n1. You own a domain, e.g., `mycompany.test`, registered via `Route53` in the **same** AWS account.\n2. The stack creates a `Route53` public Hosted Zone for the subdomain, e.g., `aws.mycompany.test`. It also automatically adds the `TXT` and `CNAME` records for verifying the domain towards SES **and** adds the NS server entries automatically to the main domain `mycompany.test`.\n3. When the subdomain `aws.mycompany.test` is successfully propagated, the stack creates a verified Domain in AWS SES and adds a recipient rule for `root@aws.mycompany.test`. On a successful propagation you will get a mail as follows to the root Email address of the account you are installing the stack 👇\n\n4. Now, any mail going to `root+<any-string>@aws.mycompany.test` will be processed by OpsSanta 🎅🏽 Lambda function and also stored in the rootmail S3 bucket 🪣.\n5. The OpsSanta function verifies the verdicts (DKIM etc.) of the sender, also skips AWS Account welcome EMails, and processes all other EMails. If it is a password reset link EMail it stores the link in the parameter store (and does *not* create an OpsItem for now). For all other mails, which are not skipped an OpsItem is created to have a central location for all items.\n> [!NOTE]\n> You can also connect your Jira to the OpsCenter.\n6. The bucket where all mail to `root@aws.mycompany.test` are stored.\n7. The [SSM parameter store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) for the password reset links.\n\n8. The OpsItem which is created. It is open and shall be further processed either in the OpsCenter or any other issue tracker.\n\n\n> [!NOTE]\n> SES support alias, so mail to `root+random-string@aws.mycompany.test` will also be catched and forwarded.\n\n## Solution design: Version 2 - external DNS provider\n<details>\n <summary>open for details</summary>\n\n\n\n```ts\nconst rootmail = new Rootmail(this, 'rootmail-stack', {\n // 1. a domain you own, registered via Route53 in the same account\n domain: 'mycompany.test';\n // 2. '' is the default, so you can also remove it\n // autowireDNSParentHostedZoneID: '',\n env: {\n // 3. or any other region SES is available\n region: 'eu-west-1',\n },\n});\n```\n\n1. You own a domain, e.g., `mycompany.test`. It can be at any registrar such as `godaddy`, also `Route53` itself in another AWS account.\n2. The stack creates a `Route53` public Hosted Zone for the subdomain, e.g., `aws.mycompany.test`. It also automatically adds the TXT and CNAME records (for DKIM etc.) for verifying the domain towards SES. **NOTE:** You must now add the NS server entries into the Domain provider which owns the main domain `mycompany.test`.\n3. items 3-7 are the same as in `v1`\n\n\n> [!NOTE]\n> After running `npm run deploy` you need to do the following steps manually:\n\n1. watch out for the hosted zone `aws.mycompany.test` to be created\n By default you have **2 hours** to wire the DNS!\n2. Then create the NS record in your domain `mycompany.test` for the subdomain `aws.mycompany.test`. Here for Route53 in AWS:\n\n3. You can test it yourself via\n```sh\ndig +short NS 8.8.8.8 aws.mycompany.test\n# should return something like\nns-1111.your-dns-provider-10.org.\nns-2222.your-dns-provider-21.co.uk.\nns-33.your-dns-provider-04.com.\nns-444.your-dns-provider-12.net.\n```\nand also by sending an EMail, e.g. from Gmail to `root@aws.mycompany.test`\n\n</details>\n\n## Uninstall\n1. Delete the stack, the custom resources will delete most resources\n2. And by design you need to manually delete the S3 Bucket containing the mails. This is to prevent accidental deletion of the mails. You can find the bucket name in the stack output.\n\n3. Furthermore, the cloudwatch log groups are not deleted, since they might contain valuable information. You can delete them manually.\n\n## Known issues\n- [jsii/2071](https://github.com/aws/jsii/issues/2071): so adding `compilerOptions.\"esModuleInterop\": true,` in `tsconfig.json` is not possible. See aws-cdk usage with[typescript](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/#Usage_with_TypeScript). So we needed to change import from `import AWS from 'aws-sdk';` -> `import * as AWS from 'aws-sdk';` to be able to compile.\n\n## Related projects\n- [aws-account-factory-email](https://github.com/aws-samples/aws-account-factory-email): a similar approach with SES, however you need to manually configure it upfront and also it about delivering root mails for a specific account to a specific mailing list and mainly decouples the real email address from the one of the AWS account. The main difference is that we do not *hide* or decouple the email address, but more make those as unique and unguessable/bruteforable as possible (with `uuids`)."
|
|
3525
|
+
"markdown": "# awscdk-rootmail\n\nA single rootmail box for all your AWS accounts. The cdk implementation and **adaption** of the [superwerker](https://superwerker.cloud/) rootmail feature. See [here](docs/adrs/rootmail.md) for a detailed Architectural Decision Record ([ADR](https://adr.github.io/))\n\n- [TL;DR](#tldr)\n- [Usage](#usage)\n - [Dependencies](#dependencies)\n - [Deploy](#deploy)\n - [CDK](#cdk)\n - [Cloudformation](#cloudformation)\n- [Solution design: Version 1 - Domain in the same AWS account](#solution-design-version-1---domain-in-the-same-aws-account)\n- [Solution design: Version 2 - external DNS provider](#solution-design-version-2---external-dns-provider)\n- [Uninstall](#uninstall)\n- [Known issues](#known-issues)\n- [Related projects](#related-projects)\n\n## TL;DR\nEach AWS account needs one unique email address (the so-called \"AWS account root user email address\").\n\nAccess to these email addresses must be adequately secured since they provide privileged access to AWS accounts, such as account deletion procedures.\n\nThis is why you only need 1 mailing list for the AWS Management (formerly *root*) account,\nwe recommend the following pattern `aws-roots+<uuid>@mycompany.test`\n\n> [!NOTE]\n> Maximum **64** characters are allowed for the whole address.\n\nAnd as you own the domain `mycompany.test` you can add a subdomain, e.g. `aws`, for which all EMails will then be received with this solution within this particular AWS Management account.\n\n## Usage\n### Dependencies\nAdministrative access to an AWS account and the following tools:\n```sh\nbrew install aws-cli node@18 esbuild\n```\n\n<details>\n <summary>... or a longer listing</summary>\n\n- Access to a development environment. It is recommended to use AWS Cloud9 to avoid having to set up the tools needed to deploy the solution. See [Getting started with AWS Cloud9](https://aws.amazon.com/cloud9/getting-started/).\n- Using Cloud9, all of the following have already been configured for you. If you choose not to use Cloud9, you will need to install the following.\n - AWS CLI. See [Installing, updating and uninstalling the AWS CLI version 2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)\n - Set up the AWS CLI with IAM access credentials. See [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n - Node.js version 10.13.0 or later\n - AWS CDK version 2.90.0 or later. For installation instructions see [Getting Started with the AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_install)\n - Docker version 20.10.x or later **OR** [esbuild](https://esbuild.github.io/)\n</details>\n\n### Deploy\nYou can chose via embedding the construct in your cdk-app or use is directly via Cloudformation.\n#### CDK\n1. To start a new project we recommend using [projen](https://projen.io/).\n 1. Create a new projen project\n ```sh\n npx projen new awscdk-app-ts\n ```\n 2. Add `@mavogel/awscdk-rootmail` as a dependency to your project in the `.projenrc.ts` file\n 3. Run `yarn run projen` to install it\n2. In you `main.ts` file add the following code\n```ts\nimport { Rootmail } from '@mavogel/awscdk-rootmail';\nimport {\n App,\n Stack,\n StackProps,\n aws_route53 as r53,\n} from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n const domain = 'mycompany.com'\n\n const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {\n domainName: domain,\n });\n\n new Rootmail(this, 'rootmail', {\n // 1. a domain you own, registered via Route53 in the SAME account\n domain: domain,\n // 2. so the subdomain will be aws.mycompany.test and\n subdomain: 'aws',\n // 3. wired / delegated automatically to\n wireDNSToHostedZoneID: hostedZone.hostedZoneId,\n });\n }\n}\n```\n2. run on your commandline\n```sh\nyarn run deploy\n```\n1. No need to do anything, the NS records are **automatically** propagated as the parent Hosted Zone is in the same account!\n2. The `hosted-zone-dkim-propagation-provider.is-complete-handler` Lambda function checks every 10 seconds if the DNS for the subdomain is propagated. Details are in the Cloudwatch log group.\n\n### CDK with your own receiver function\nYou might also want to pass in you own function on what to do when an EMail is received\n\nfile `functions/custom-ses-receive-function.ts` which gets the 2 environment variables populated\n- `EMAIL_BUCKET`\n- `EMAIL_BUCKET_ARN`\n\nas well as `s3:GetObject` on the `RootMail/*` objects in the created Rootmail `S3` bucket.\n\n```ts\nimport { S3 } from '@aws-sdk/client-s3';\nimport { ParsedMail, simpleParser } from 'mailparser';\n// populated by default\nconst emailBucket = process.env.EMAIL_BUCKET;\nconst emailBucketArn = process.env.EMAIL_BUCKET_ARN;\nconst s3 = new S3();\n\n// SESEventRecordsToLambda\n// from https://docs.aws.amazon.com/ses/latest/dg/receiving-email-action-lambda-event.html\nexport const handler = async (event: SESEventRecordsToLambda) => {\n for (const record of event.Records) {\n\n const id = record.ses.mail.messageId;\n const key = `RootMail/${id}`;\n const response = await s3.getObject({ Bucket: emailBucket as string, Key: key });\n\n const msg: ParsedMail = await simpleParser(response.Body as unknown as Buffer);\n\n let title = msg.subject;\n console.log(`Title: ${title} from emailBucketArn: ${emailBucketArn}`);\n // use the content of the email body\n const body = msg.html;\n // add your custom code here ...\n\n // dummy example: list s3 buckets\n const buckets = await s3.listBuckets({});\n if (!buckets.Buckets) {\n console.log('No buckets found');\n return;\n }\n console.log('Buckets:');\n for (const bucket of buckets.Buckets || []) {\n console.log(bucket.Name);\n }\n }\n\n};\n```\nand you create a separate `NodejsFunction` as follows with the additionally needed IAM permissions:\n```ts\nconst customSesReceiveFunction = new NodejsFunction(stackUnderTest, 'custom-ses-receive-function', {\n functionName: PhysicalName.GENERATE_IF_NEEDED,\n entry: path.join(__dirname, 'functions', 'custom-ses-receive-function.ts'),\n runtime: lambda.Runtime.NODEJS_18_X,\n logRetention: 1,\n timeout: Duration.seconds(30),\n});\n\n// Note: any additional permissions you need to add to the function yourself!\ncustomSesReceiveFunction.addToRolePolicy(new iam.PolicyStatement({\n actions: [\n 's3:List*',\n ],\n resources: ['*'],\n}))\n```\nand then pass it into the `Rootmail` Stack\n```ts\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n const domain = 'mycompany.test'\n const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {\n domainName: domain,\n });\n\n const rootmail = new Rootmail(this, 'rootmail-stack', {\n domain: domain;\n autowireDNSParentHostedZoneID: hostedZone.hostedZoneId,\n env: {\n region: 'eu-west-1',\n },\n customSesReceiveFunction: customSesReceiveFunction, // <- pass it in here\n });\n }\n}\n```\n\n#### Cloudformation\nor use it directly a Cloudformation template `yaml` from the URL [here](https://mvc-test4-bucket-eu-west-1.s3.eu-west-1.amazonaws.com/rootmail/0.0.13-DEVELOPMENT/rootmailStack.template.yaml).\n\n\n<details>\n <summary>... click to expand</summary>\n\nand fill out the parameters\n\n\n</details>\n\n## Solution design: Version 1 - Domain in the same AWS account\n\n\n1. You own a domain, e.g., `mycompany.test`, registered via `Route53` in the **same** AWS account.\n2. The stack creates a `Route53` public Hosted Zone for the subdomain, e.g., `aws.mycompany.test`. It also automatically adds the `TXT` and `CNAME` records for verifying the domain towards SES **and** adds the NS server entries automatically to the main domain `mycompany.test`.\n3. When the subdomain `aws.mycompany.test` is successfully propagated, the stack creates a verified Domain in AWS SES and adds a recipient rule for `root@aws.mycompany.test`. On a successful propagation you will get a mail as follows to the root Email address of the account you are installing the stack 👇\n\n4. Now, any mail going to `root+<any-string>@aws.mycompany.test` will be processed by OpsSanta 🎅🏽 Lambda function and also stored in the rootmail S3 bucket 🪣.\n5. The OpsSanta function verifies the verdicts (DKIM etc.) of the sender, also skips AWS Account welcome EMails, and processes all other EMails. If it is a password reset link EMail it stores the link in the parameter store (and does *not* create an OpsItem for now). For all other mails, which are not skipped an OpsItem is created to have a central location for all items.\n> [!NOTE]\n> You can also connect your Jira to the OpsCenter.\n6. The bucket where all mail to `root@aws.mycompany.test` are stored.\n7. The [SSM parameter store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) for the password reset links.\n\n8. The OpsItem which is created. It is open and shall be further processed either in the OpsCenter or any other issue tracker.\n\n\n> [!NOTE]\n> SES support alias, so mail to `root+random-string@aws.mycompany.test` will also be catched and forwarded.\n\n## Solution design: Version 2 - external DNS provider\n<details>\n <summary>open for details</summary>\n\n\n\n```ts\nconst rootmail = new Rootmail(this, 'rootmail-stack', {\n // 1. a domain you own, registered via Route53 in the same account\n domain: 'mycompany.test';\n // 2. '' is the default, so you can also remove it\n // autowireDNSParentHostedZoneID: '',\n env: {\n // 3. or any other region SES is available\n region: 'eu-west-1',\n },\n});\n```\n\n1. You own a domain, e.g., `mycompany.test`. It can be at any registrar such as `godaddy`, also `Route53` itself in another AWS account.\n2. The stack creates a `Route53` public Hosted Zone for the subdomain, e.g., `aws.mycompany.test`. It also automatically adds the TXT and CNAME records (for DKIM etc.) for verifying the domain towards SES. **NOTE:** You must now add the NS server entries into the Domain provider which owns the main domain `mycompany.test`.\n3. items 3-7 are the same as in `v1`\n\n\n> [!NOTE]\n> After running `yarn run deploy` you need to do the following steps manually:\n\n1. watch out for the hosted zone `aws.mycompany.test` to be created\n By default you have **2 hours** to wire the DNS!\n2. Then create the NS record in your domain `mycompany.test` for the subdomain `aws.mycompany.test`. Here for Route53 in AWS:\n\n3. You can test it yourself via\n```sh\ndig +short NS 8.8.8.8 aws.mycompany.test\n# should return something like\nns-1111.your-dns-provider-10.org.\nns-2222.your-dns-provider-21.co.uk.\nns-33.your-dns-provider-04.com.\nns-444.your-dns-provider-12.net.\n```\nand also by sending an EMail, e.g. from Gmail to `root@aws.mycompany.test`\n\n</details>\n\n## Uninstall\n1. Delete the stack, the custom resources will delete most resources\n2. And by design you need to manually delete the S3 Bucket containing the mails. This is to prevent accidental deletion of the mails. You can find the bucket name in the stack output.\n\n3. Furthermore, the cloudwatch log groups are not deleted, since they might contain valuable information. You can delete them manually.\n\n## Known issues\n- [jsii/2071](https://github.com/aws/jsii/issues/2071): so adding `compilerOptions.\"esModuleInterop\": true,` in `tsconfig.json` is not possible. See aws-cdk usage with[typescript](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/#Usage_with_TypeScript). So we needed to change import from `import AWS from 'aws-sdk';` -> `import * as AWS from 'aws-sdk';` to be able to compile.\n\n## Related projects\n- [aws-account-factory-email](https://github.com/aws-samples/aws-account-factory-email): a similar approach with SES, however you need to manually configure it upfront and also it about delivering root mails for a specific account to a specific mailing list and mainly decouples the real email address from the one of the AWS account. The main difference is that we do not *hide* or decouple the email address, but more make those as unique and unguessable/bruteforable as possible (with `uuids`)."
|
|
3526
3526
|
},
|
|
3527
3527
|
"repository": {
|
|
3528
3528
|
"type": "git",
|
|
@@ -3548,7 +3548,7 @@
|
|
|
3548
3548
|
},
|
|
3549
3549
|
"locationInModule": {
|
|
3550
3550
|
"filename": "src/rootmail.ts",
|
|
3551
|
-
"line":
|
|
3551
|
+
"line": 72
|
|
3552
3552
|
},
|
|
3553
3553
|
"parameters": [
|
|
3554
3554
|
{
|
|
@@ -3574,7 +3574,7 @@
|
|
|
3574
3574
|
"kind": "class",
|
|
3575
3575
|
"locationInModule": {
|
|
3576
3576
|
"filename": "src/rootmail.ts",
|
|
3577
|
-
"line":
|
|
3577
|
+
"line": 68
|
|
3578
3578
|
},
|
|
3579
3579
|
"name": "Rootmail",
|
|
3580
3580
|
"properties": [
|
|
@@ -3585,7 +3585,7 @@
|
|
|
3585
3585
|
"immutable": true,
|
|
3586
3586
|
"locationInModule": {
|
|
3587
3587
|
"filename": "src/rootmail.ts",
|
|
3588
|
-
"line":
|
|
3588
|
+
"line": 70
|
|
3589
3589
|
},
|
|
3590
3590
|
"name": "emailBucket",
|
|
3591
3591
|
"type": {
|
|
@@ -3599,7 +3599,7 @@
|
|
|
3599
3599
|
"immutable": true,
|
|
3600
3600
|
"locationInModule": {
|
|
3601
3601
|
"filename": "src/rootmail.ts",
|
|
3602
|
-
"line":
|
|
3602
|
+
"line": 69
|
|
3603
3603
|
},
|
|
3604
3604
|
"name": "hostedZoneParameterName",
|
|
3605
3605
|
"type": {
|
|
@@ -3656,6 +3656,24 @@
|
|
|
3656
3656
|
"fqn": "aws-cdk-lib.aws_lambda.Function"
|
|
3657
3657
|
}
|
|
3658
3658
|
},
|
|
3659
|
+
{
|
|
3660
|
+
"abstract": true,
|
|
3661
|
+
"docs": {
|
|
3662
|
+
"default": "RemovalPolicy.RETAIN",
|
|
3663
|
+
"stability": "stable",
|
|
3664
|
+
"summary": "The removal policy for the email bucket."
|
|
3665
|
+
},
|
|
3666
|
+
"immutable": true,
|
|
3667
|
+
"locationInModule": {
|
|
3668
|
+
"filename": "src/rootmail.ts",
|
|
3669
|
+
"line": 58
|
|
3670
|
+
},
|
|
3671
|
+
"name": "emailBucketDeletePolicy",
|
|
3672
|
+
"optional": true,
|
|
3673
|
+
"type": {
|
|
3674
|
+
"fqn": "aws-cdk-lib.RemovalPolicy"
|
|
3675
|
+
}
|
|
3676
|
+
},
|
|
3659
3677
|
{
|
|
3660
3678
|
"abstract": true,
|
|
3661
3679
|
"docs": {
|
|
@@ -3667,7 +3685,7 @@
|
|
|
3667
3685
|
"immutable": true,
|
|
3668
3686
|
"locationInModule": {
|
|
3669
3687
|
"filename": "src/rootmail.ts",
|
|
3670
|
-
"line":
|
|
3688
|
+
"line": 65
|
|
3671
3689
|
},
|
|
3672
3690
|
"name": "setDestroyPolicyToAllResources",
|
|
3673
3691
|
"optional": true,
|
|
@@ -3877,6 +3895,6 @@
|
|
|
3877
3895
|
"symbolId": "src/ses-receive:SESReceiveProps"
|
|
3878
3896
|
}
|
|
3879
3897
|
},
|
|
3880
|
-
"version": "0.0.
|
|
3881
|
-
"fingerprint": "
|
|
3898
|
+
"version": "0.0.215",
|
|
3899
|
+
"fingerprint": "10wDZZMD6arcR6VL6jgkP79b1Sa4sARpdAkLc2Xocjs="
|
|
3882
3900
|
}
|
package/API.md
CHANGED
|
@@ -240,6 +240,7 @@ const rootmailProps: RootmailProps = { ... }
|
|
|
240
240
|
| --- | --- | --- |
|
|
241
241
|
| <code><a href="#@mavogel/awscdk-rootmail.RootmailProps.property.domain">domain</a></code> | <code>string</code> | Domain used for root mail feature. |
|
|
242
242
|
| <code><a href="#@mavogel/awscdk-rootmail.RootmailProps.property.customSesReceiveFunction">customSesReceiveFunction</a></code> | <code>aws-cdk-lib.aws_lambda.Function</code> | The custom SES receive function to use. |
|
|
243
|
+
| <code><a href="#@mavogel/awscdk-rootmail.RootmailProps.property.emailBucketDeletePolicy">emailBucketDeletePolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | The removal policy for the email bucket. |
|
|
243
244
|
| <code><a href="#@mavogel/awscdk-rootmail.RootmailProps.property.setDestroyPolicyToAllResources">setDestroyPolicyToAllResources</a></code> | <code>boolean</code> | Whether to set all removal policies to DESTROY. |
|
|
244
245
|
| <code><a href="#@mavogel/awscdk-rootmail.RootmailProps.property.subdomain">subdomain</a></code> | <code>string</code> | Subdomain used for root mail feature. |
|
|
245
246
|
| <code><a href="#@mavogel/awscdk-rootmail.RootmailProps.property.totalTimeToWireDNS">totalTimeToWireDNS</a></code> | <code>aws-cdk-lib.Duration</code> | The total time to wait for the DNS records to be available/wired. |
|
|
@@ -271,6 +272,19 @@ The custom SES receive function to use.
|
|
|
271
272
|
|
|
272
273
|
---
|
|
273
274
|
|
|
275
|
+
##### `emailBucketDeletePolicy`<sup>Optional</sup> <a name="emailBucketDeletePolicy" id="@mavogel/awscdk-rootmail.RootmailProps.property.emailBucketDeletePolicy"></a>
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
public readonly emailBucketDeletePolicy: RemovalPolicy;
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
282
|
+
- *Default:* RemovalPolicy.RETAIN
|
|
283
|
+
|
|
284
|
+
The removal policy for the email bucket.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
274
288
|
##### `setDestroyPolicyToAllResources`<sup>Optional</sup> <a name="setDestroyPolicyToAllResources" id="@mavogel/awscdk-rootmail.RootmailProps.property.setDestroyPolicyToAllResources"></a>
|
|
275
289
|
|
|
276
290
|
```typescript
|
package/CONTRIBUTING.md
CHANGED
|
@@ -31,9 +31,9 @@ To send us a pull request, please:
|
|
|
31
31
|
|
|
32
32
|
1. Fork the repository.
|
|
33
33
|
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
|
|
34
|
-
3. Ensure local tests pass -> `
|
|
35
|
-
4.
|
|
36
|
-
5. Build the project -> `
|
|
34
|
+
3. Ensure local tests pass -> `yarn run test`
|
|
35
|
+
4. The integ tests will run separately in the AWS account of the owner of the project.
|
|
36
|
+
5. Build the project -> `yarn run build` to also update the `API.md` file.
|
|
37
37
|
6. Commit to your fork using clear commit messages.
|
|
38
38
|
7. Send us a pull request, answering any default questions in the pull request interface.
|
|
39
39
|
8. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ You can chose via embedding the construct in your cdk-app or use is directly via
|
|
|
55
55
|
npx projen new awscdk-app-ts
|
|
56
56
|
```
|
|
57
57
|
2. Add `@mavogel/awscdk-rootmail` as a dependency to your project in the `.projenrc.ts` file
|
|
58
|
-
3. Run `
|
|
58
|
+
3. Run `yarn run projen` to install it
|
|
59
59
|
2. In you `main.ts` file add the following code
|
|
60
60
|
```ts
|
|
61
61
|
import { Rootmail } from '@mavogel/awscdk-rootmail';
|
|
@@ -90,7 +90,7 @@ export class MyStack extends Stack {
|
|
|
90
90
|
```
|
|
91
91
|
2. run on your commandline
|
|
92
92
|
```sh
|
|
93
|
-
|
|
93
|
+
yarn run deploy
|
|
94
94
|
```
|
|
95
95
|
1. No need to do anything, the NS records are **automatically** propagated as the parent Hosted Zone is in the same account!
|
|
96
96
|
2. The `hosted-zone-dkim-propagation-provider.is-complete-handler` Lambda function checks every 10 seconds if the DNS for the subdomain is propagated. Details are in the Cloudwatch log group.
|
|
@@ -241,7 +241,7 @@ const rootmail = new Rootmail(this, 'rootmail-stack', {
|
|
|
241
241
|
|
|
242
242
|
|
|
243
243
|
> [!NOTE]
|
|
244
|
-
> After running `
|
|
244
|
+
> After running `yarn run deploy` you need to do the following steps manually:
|
|
245
245
|
|
|
246
246
|
1. watch out for the hosted zone `aws.mycompany.test` to be created
|
|
247
247
|
 By default you have **2 hours** to wire the DNS!
|
package/integ-tests/README.md
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
# integ-tests
|
|
2
2
|
|
|
3
|
+
Still WIP!
|
|
4
|
+
|
|
3
5
|
## run
|
|
4
6
|
### changes
|
|
5
7
|
1. do the changes in the `*.ts` files
|
|
6
8
|
2. from the root of the project run
|
|
7
9
|
```bash
|
|
8
10
|
# run the dry-run to see changes if they are destructive
|
|
9
|
-
|
|
11
|
+
yarn run integ-test -- --dry-run
|
|
10
12
|
# NOTE: undo the changes in the integ.snapshot so the next call
|
|
11
13
|
# will really run the tests with the update
|
|
12
14
|
# run the tests
|
|
13
|
-
|
|
15
|
+
yarn run integ-test
|
|
14
16
|
```
|
|
15
17
|
|
|
16
18
|
### changes in CR
|
|
17
19
|
the `integ-runner` does not detect the changes, this is why we need to run all test via the `--force` flag
|
|
18
20
|
```bash
|
|
19
|
-
|
|
21
|
+
yarn run integ-test -- --force
|
|
20
22
|
```
|
|
21
23
|
|
|
22
24
|
## clean up manually
|
|
@@ -31,8 +33,13 @@ pip3 install -r requirements.tx
|
|
|
31
33
|
aws s3 ls | grep rootmailinteg
|
|
32
34
|
# empty and remove the bucket
|
|
33
35
|
python3 cleanup/empty-and-delete-s3-bucket.py rootmailintegteststack-testrootmailemailbucket<suffix>
|
|
36
|
+
# or short in fish
|
|
37
|
+
for bucket in $(aws s3 ls | grep rootmailinteg | awk '{ print $3 }'); echo $bucket; python3 cleanup/empty-and-delete-s3-bucket.py $bucket; end
|
|
34
38
|
# remove the log groups. generic or more specific with 'rootmailinteg' and 'SetupTest'
|
|
35
|
-
python3 cleanup/delete-log-groups.py
|
|
39
|
+
python3 cleanup/delete-log-groups.py Integ eu-west-1
|
|
40
|
+
python3 cleanup/delete-log-groups.py Integ eu-west-2
|
|
41
|
+
# or short in fish
|
|
42
|
+
for lgregion in eu-west-1 eu-west-2; echo $lgregion; python3 cleanup/delete-log-groups.py Integ $lgregion; end
|
|
36
43
|
|
|
37
44
|
# when your done deactive the virtual env via
|
|
38
45
|
# see https://stackoverflow.com/questions/990754/how-to-leave-exit-deactivate-a-python-virtualenv
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
RELEASE_VERSION=$1
|
|
4
|
+
if [ -z "$RELEASE_VERSION" ]; then
|
|
5
|
+
echo "Please provide the release version as the first argument."
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
echo "Using release version: '$RELEASE_VERSION'"
|
|
9
|
+
|
|
10
|
+
echo "Running E2E test for CloudFormation template."
|
|
11
|
+
aws cloudformation create-stack \
|
|
12
|
+
--stack-name rootmail-cfn-test \
|
|
13
|
+
--template-url https://mvc-dev-releases.s3.eu-central-1.amazonaws.com/rootmail/${RELEASE_VERSION}/awscdk-rootmail.template.json \
|
|
14
|
+
--parameters ParameterKey=Domain,ParameterValue=rootmail-test.mavogel.xyz ParameterKey=Subdomain,ParameterValue=zft23-eu-central-1 ParameterKey=WireDNSToHostedZoneID,ParameterValue=Z01336592122MNIWKOZSV \
|
|
15
|
+
--disable-rollback \
|
|
16
|
+
--capabilities CAPABILITY_AUTO_EXPAND CAPABILITY_IAM CAPABILITY_NAMED_IAM \
|
|
17
|
+
--no-cli-pager \
|
|
18
|
+
--region eu-central-1
|
|
19
|
+
|
|
20
|
+
# get the status of the stack
|
|
21
|
+
count=0
|
|
22
|
+
max_create_count=60 # 10min
|
|
23
|
+
while [[ ! "$STACK_STATUS" == *"_FAILED" ]] && [[ ! "$STACK_STATUS" == *"_COMPLETE" ]]; do
|
|
24
|
+
sleep 10
|
|
25
|
+
count=$((count+1))
|
|
26
|
+
STACK_STATUS=$(aws cloudformation describe-stacks --stack-name rootmail-cfn-test --query 'Stacks[0].StackStatus' --output text --region eu-central-1)
|
|
27
|
+
echo "($count/$max_create_count) Stack status: $STACK_STATUS at $(date)"
|
|
28
|
+
if [ $count -eq $max_create_count ]; then
|
|
29
|
+
echo "Max retries reached. Stack creation failed."
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
echo "Stack creation successful. Sleep for 5 seconds."
|
|
35
|
+
sleep 5
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "Deleting the stack."
|
|
4
|
+
aws cloudformation delete-stack --stack-name rootmail-cfn-test --region eu-central-1
|
|
5
|
+
|
|
6
|
+
# wait for the stack to be deleted
|
|
7
|
+
count=0
|
|
8
|
+
max_delete_count=60 # 10min
|
|
9
|
+
STACK_STATUS="undefined"
|
|
10
|
+
while [[ ! "$STACK_STATUS" == *"_FAILED" ]] && [[ ! "$STACK_STATUS" == *"_COMPLETE" ]]; do
|
|
11
|
+
sleep 10
|
|
12
|
+
count=$((count+1))
|
|
13
|
+
STACK_STATUS=$(aws cloudformation describe-stacks --stack-name rootmail-cfn-test --query 'Stacks[0].StackStatus' --output text --region eu-central-1)
|
|
14
|
+
echo "($count/$max_delete_count) Stack status: $STACK_STATUS at $(date)"
|
|
15
|
+
# if STACK_STATUS is empty, the stack does not exist anymore
|
|
16
|
+
if [ -z "$STACK_STATUS" ]; then
|
|
17
|
+
echo "Stack deletion successful."
|
|
18
|
+
break
|
|
19
|
+
fi
|
|
20
|
+
if [ $count -eq $max_delete_count ]; then
|
|
21
|
+
echo "Max retries reached. Stack deletion failed."
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
done
|
|
25
|
+
|
|
26
|
+
echo "E2E test for CloudFormation template finished."
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from 'aws-cdk-lib';
|
|
12
12
|
import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
|
|
13
13
|
import { Rootmail } from '../src/rootmail';
|
|
14
|
+
import { testDomain, hostedZoneId } from './common';
|
|
14
15
|
// CDK App for Integration Tests
|
|
15
16
|
const app = new App();
|
|
16
17
|
// Stack under test
|
|
@@ -19,8 +20,6 @@ const stackUnderTest = new Stack(app, stackUnderTestName, {
|
|
|
19
20
|
description: "This stack includes the application's resources for integration testing.",
|
|
20
21
|
});
|
|
21
22
|
|
|
22
|
-
const testDomain = 'rootmail-test.mavogel.xyz';
|
|
23
|
-
const hostedZoneId = 'Z066250529JROZU7IIY3Q';
|
|
24
23
|
const randomTestId = 'c23qgsa2';
|
|
25
24
|
const testSubdomain = `${randomTestId}-${Stack.of(stackUnderTest).region}`;
|
|
26
25
|
const fullDomain = `${testSubdomain}.${testDomain}`;
|
package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/RootmailIntegTestStack.assets.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "33.0.0",
|
|
3
3
|
"files": {
|
|
4
|
-
"
|
|
4
|
+
"97724f55c990db7c62d85b80d4afb032e60011490da173e3551e6a131013b79d": {
|
|
5
5
|
"source": {
|
|
6
|
-
"path": "asset.
|
|
6
|
+
"path": "asset.97724f55c990db7c62d85b80d4afb032e60011490da173e3551e6a131013b79d",
|
|
7
7
|
"packaging": "zip"
|
|
8
8
|
},
|
|
9
9
|
"destinations": {
|
|
10
10
|
"current_account-current_region": {
|
|
11
11
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
12
|
-
"objectKey": "
|
|
12
|
+
"objectKey": "97724f55c990db7c62d85b80d4afb032e60011490da173e3551e6a131013b79d.zip",
|
|
13
13
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
"
|
|
30
|
+
"f75274dd7677b6ef41f29d2dfc2c885b4f4e069d3fb8e67636bd89efd3f0fcad": {
|
|
31
31
|
"source": {
|
|
32
|
-
"path": "asset.
|
|
32
|
+
"path": "asset.f75274dd7677b6ef41f29d2dfc2c885b4f4e069d3fb8e67636bd89efd3f0fcad",
|
|
33
33
|
"packaging": "zip"
|
|
34
34
|
},
|
|
35
35
|
"destinations": {
|
|
36
36
|
"current_account-current_region": {
|
|
37
37
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
38
|
-
"objectKey": "
|
|
38
|
+
"objectKey": "f75274dd7677b6ef41f29d2dfc2c885b4f4e069d3fb8e67636bd89efd3f0fcad.zip",
|
|
39
39
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
|
-
"
|
|
147
|
+
"c8ec203309c2c203c70b59d98084241414aa0642a0880d346858b3467db17aa9": {
|
|
148
148
|
"source": {
|
|
149
149
|
"path": "RootmailIntegTestStack.template.json",
|
|
150
150
|
"packaging": "file"
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"destinations": {
|
|
153
153
|
"current_account-current_region": {
|
|
154
154
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
155
|
-
"objectKey": "
|
|
155
|
+
"objectKey": "c8ec203309c2c203c70b59d98084241414aa0642a0880d346858b3467db17aa9.json",
|
|
156
156
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
157
157
|
}
|
|
158
158
|
}
|
package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/RootmailIntegTestStack.template.json
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"S3Bucket": {
|
|
61
61
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
62
62
|
},
|
|
63
|
-
"S3Key": "
|
|
63
|
+
"S3Key": "97724f55c990db7c62d85b80d4afb032e60011490da173e3551e6a131013b79d.zip"
|
|
64
64
|
},
|
|
65
65
|
"Environment": {
|
|
66
66
|
"Variables": {
|
|
@@ -621,7 +621,7 @@
|
|
|
621
621
|
]
|
|
622
622
|
]
|
|
623
623
|
},
|
|
624
|
-
"ParentHostedZoneId": "
|
|
624
|
+
"ParentHostedZoneId": "Z01336592122MNIWKOZSV",
|
|
625
625
|
"HostedZoneParameterName": {
|
|
626
626
|
"Ref": "testRootmailHostedZoneSSMParameter574DA41C"
|
|
627
627
|
},
|
|
@@ -918,7 +918,7 @@
|
|
|
918
918
|
"S3Bucket": {
|
|
919
919
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
920
920
|
},
|
|
921
|
-
"S3Key": "
|
|
921
|
+
"S3Key": "f75274dd7677b6ef41f29d2dfc2c885b4f4e069d3fb8e67636bd89efd3f0fcad.zip"
|
|
922
922
|
},
|
|
923
923
|
"Environment": {
|
|
924
924
|
"Variables": {
|
|
@@ -1482,7 +1482,7 @@
|
|
|
1482
1482
|
"route53:ListResourceRecordSets"
|
|
1483
1483
|
],
|
|
1484
1484
|
"Effect": "Allow",
|
|
1485
|
-
"Resource": "arn:aws:route53:::hostedzone/
|
|
1485
|
+
"Resource": "arn:aws:route53:::hostedzone/Z01336592122MNIWKOZSV"
|
|
1486
1486
|
}
|
|
1487
1487
|
],
|
|
1488
1488
|
"Version": "2012-10-17"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"
|
|
17
|
+
"609212f0e28dcfd78dd3dab36ef82ce3dcc3d5d2b06cb4493bcc46552a5b0811": {
|
|
18
18
|
"source": {
|
|
19
19
|
"path": "SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.template.json",
|
|
20
20
|
"packaging": "file"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"destinations": {
|
|
23
23
|
"current_account-current_region": {
|
|
24
24
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
25
|
-
"objectKey": "
|
|
25
|
+
"objectKey": "609212f0e28dcfd78dd3dab36ef82ce3dcc3d5d2b06cb4493bcc46552a5b0811.json",
|
|
26
26
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"flattenResponse": "false",
|
|
48
|
-
"salt": "
|
|
48
|
+
"salt": "1732466751546"
|
|
49
49
|
},
|
|
50
50
|
"DependsOn": [
|
|
51
51
|
"AwsApiCallSSMgetParameterd4c847c906a9dd9484fbf0d62db16d9b"
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
"Name": "\"/rootmail/domain_name_servers\""
|
|
189
189
|
},
|
|
190
190
|
"flattenResponse": "false",
|
|
191
|
-
"salt": "
|
|
191
|
+
"salt": "1732466751546"
|
|
192
192
|
},
|
|
193
193
|
"UpdateReplacePolicy": "Delete",
|
|
194
194
|
"DeletionPolicy": "Delete"
|