import 'source-map-support/register' ; import { App } from '@aws-cdk/core' ; import { KendraStack } from '../lib/stacks/kendra-stack' ; import { WebCrawlerStack } from '../lib/stacks/web-crawler-stack' ; const app = new App ( ) ; const shouldDeployKendra = app . node . tryGetContext ( 'kendra' ) === 'true' ; const kendra = shouldDeployKendra ? new KendraStack ( app , 'KendraStack' ) . kendra : undefined ; new WebCrawlerStack ( app , 'WebCrawlerStack' , { kendra } ) ;