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

312
Vistas
AWS CDK synth and different cdk.json files

So, I have 3 different cdk.json files with different name/value pairs: cdk.json, cdk-west.json cdk-east.json

When, I run a synth or deploy, can I specify a specific json file instead of the default cdk.json one?

I know you can change profiles with the --profile option, but not sure about cdk.json

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

0

Unfortunately, there is no such option.

over 4 years ago · Santiago Trujillo Denunciar

0

A good way around this is to add an "environment" attribute to your cdk.json file with attributes for each environment that contain settings for that environment.

{
...
"environments":{
   "xxxxxxxxxxxx":{
      "name": "dev",
      "awsAccountId":"xxxxxxxxxxxx",
      "awsRegion":"us-west-2",
      "logLevel":"debug",
      "customSetting": "value 1",
      ...
   },
   "prod-west-1-account-id":{
      "name": "prod-us-west-1",
      ...
   },
   "prod-west-2-account-id":{
      "name": "prod-us-west-2",
      ...
   }
}

Then each Stack can grab the appropriate environment configuration based on the value of "this.account"

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