i believe that is the outdated way depending what version of CDK you are currently using. cdk --version in command line, if in version 2 then use new code import * as cdk from 'aws-cdk-lib'