Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

681
Vistas
AWS CDK Init for an existing project

I'm trying to initialize the AWS CDK on a new website I just created via Visual Studio.

But when I run the init commmand I get the error: cdk init cannot be run in a non-empty directory

❯ cdk init app --language=csharp
`cdk init` cannot be run in a non-empty directory!

The CDK Workshop uses the example of starting from scrach (in an empty directory).

Is it possible to initialize the CDK inside an existing solution/project?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

cdk init creats a basic structure and skelton such as app and sub directory in which it create a stack.

You can run it in a empty directory and then back up the files you will override, then copy an actual cdk application/project (such as workshop one) into it.

I use this way to create another CDK project when I re-use the existing one.

over 4 years ago · Santiago Trujillo Denunciar

0

At the moment there is no way to execute cdk init in a non-empty directory. This is a safety net against cluttering a directory with the CDK files where they might not be wanted.

That said, there is no practical reason a command flag to override this protection couldnt be added. You could consider putting in a feature-request on the repo.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda