-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcdk.ts
More file actions
54 lines (47 loc) · 1.38 KB
/
cdk.ts
File metadata and controls
54 lines (47 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import { MainStack } from '../lib/main-stack';
import { UsEast1Stack } from '../lib/us-east-1-stack';
const app = new cdk.App();
interface EnvironmentProps {
account: string;
/**
* Custom domain name for the webapp and Cognito.
* You need to have a public Route53 hosted zone for the domain name in your AWS account.
*
* @default No custom domain name.
*/
domainName?: string;
/**
* Use a NAT instance instead of NAT Gateways.
* @default true
*/
useNatInstance?: boolean;
}
const props: EnvironmentProps = {
account: process.env.CDK_DEFAULT_ACCOUNT!,
// domainName: 'FIXME.example.com',
useNatInstance: true,
};
const virginia = new UsEast1Stack(app, 'ServerlessWebappStarterKitUsEast1Stack', {
env: {
account: props.account,
region: 'us-east-1',
},
crossRegionReferences: true,
domainName: props.domainName,
});
new MainStack(app, 'ServerlessWebappStarterKitStack', {
env: {
account: props.account,
region: process.env.CDK_DEFAULT_REGION,
},
crossRegionReferences: true,
sharedCertificate: virginia.certificate,
domainName: props.domainName,
signPayloadHandler: virginia.signPayloadHandler,
});
// import { Aspects } from 'aws-cdk-lib';
// import { AwsSolutionsChecks } from 'cdk-nag';
// Aspects.of(app).add(new AwsSolutionsChecks());