Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

313
Visualizações
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 Respostas
Responde à pergunta

0

Unfortunately, there is no such option.

over 4 years ago · Santiago Trujillo Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda