diff --git a/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts b/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts index aec98340ac499..8cd8424219d2b 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts @@ -571,9 +571,9 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ name: string, prefix?: string, port?: number, - { global = false }: InterfaceVpcEndpointAwsServiceProps = {}, + props?: InterfaceVpcEndpointAwsServiceProps, ) { - const regionPrefix = global ? '' : (Lazy.uncachedString({ + const regionPrefix = props?.global ? '' : (Lazy.uncachedString({ produce: (context) => Stack.of(context.scope).region, }) + '.'); const defaultEndpointPrefix = Lazy.uncachedString({