diff --git a/lib/shared/index.ts b/lib/shared/index.ts index f9f11477..f66120fb 100644 --- a/lib/shared/index.ts +++ b/lib/shared/index.ts @@ -69,7 +69,7 @@ export class Shared extends Construct { } if ( - props.config.privateWebsite || + typeof props.config.vpc?.createVpcEndpoints === "undefined" || props.config.vpc?.createVpcEndpoints === true ) { // Create a VPC endpoint for S3. @@ -104,6 +104,9 @@ export class Shared extends Construct { open: true, }); + } + + if (props.config.privateWebsite) { // Create VPC Endpoint for AppSync vpc.addInterfaceEndpoint("AppSyncEndpoint", { service: ec2.InterfaceVpcEndpointAwsService.APP_SYNC, @@ -181,7 +184,6 @@ export class Shared extends Construct { // privateDnsEnabled: true // }); // // } - }