

Ini adalah Panduan Pengembang AWS CDK v2. CDK v1 yang lebih lama memasuki pemeliharaan pada 1 Juni 2022 dan mengakhiri dukungan pada 1 Juni 2023.

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Konfigurasikan dan lakukan sintesis tumpukan CDK
<a name="configure-synth"></a>

Sebelum Anda dapat menerapkan tumpukan AWS Cloud Development Kit (AWS CDK), itu harus disintesis terlebih dahulu. *Stack synthesis* adalah proses memproduksi AWS CloudFormation template dan artefak penyebaran dari tumpukan CDK. Template dan artefak dikenal sebagai *perakitan cloud*. Perakitan cloud adalah apa yang digunakan untuk menyediakan sumber daya Anda. AWS Untuk informasi selengkapnya tentang cara kerja penerapan, lihat [Cara kerja penerapan AWS CDK](deploy.md#deploy-how).

## Bagaimana sintesis dan bootstrap bekerja sama
<a name="configure-synth-bootstrap"></a>

Agar aplikasi CDK Anda dapat diterapkan dengan benar, CloudFormation templat yang dihasilkan selama sintesis harus menentukan sumber daya yang dibuat dengan benar selama bootstrap. Oleh karena itu, bootstrap dan sintesis harus saling melengkapi agar penerapan berhasil:
+ Bootstrapping adalah proses satu kali menyiapkan AWS lingkungan untuk penerapan CDK. AWS Ini mengonfigurasi AWS sumber daya tertentu di lingkungan Anda yang digunakan oleh CDK untuk penerapan. Ini biasanya disebut sebagai *sumber daya bootstrap*. Untuk petunjuk tentang bootstrap, lihat [Bootstrap lingkungan Anda untuk digunakan dengan](bootstrapping-env.md) CDK. AWS 
+ CloudFormation template yang dihasilkan selama sintesis mencakup informasi tentang sumber daya bootstrap mana yang akan digunakan. Selama sintesis, CDK CLI tidak tahu secara spesifik bagaimana lingkungan AWS Anda telah di-bootstrap. Sebagai gantinya, CDK CLI CloudFormation menghasilkan template berdasarkan synthesizer yang Anda konfigurasikan untuk setiap tumpukan CDK. Agar penerapan berhasil, synthesizer harus menghasilkan CloudFormation template yang mereferensikan sumber daya bootstrap yang benar untuk digunakan.

CDK dilengkapi dengan synthesizer default dan konfigurasi bootstrap yang dirancang untuk bekerja sama. Jika Anda menyesuaikan satu, Anda harus menerapkan penyesuaian yang relevan ke yang lain.

## Cara mengkonfigurasi sintesis tumpukan CDK
<a name="bootstrapping-synthesizers"></a>

Anda mengonfigurasi sintesis tumpukan CDK menggunakan `synthesizer` properti [https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html)instance Anda. Properti ini menentukan bagaimana tumpukan CDK Anda akan disintesis. Anda memberikan instance dari kelas yang mengimplementasikan [https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IStackSynthesizer.html](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IStackSynthesizer.html)atau [https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IReusableStackSynthesizer.html](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IReusableStackSynthesizer.html). Metodenya akan dipanggil setiap kali aset ditambahkan ke tumpukan atau ketika tumpukan disintesis. Berikut ini adalah contoh dasar menggunakan properti ini dalam tumpukan Anda:

**Example**  

```
new MyStack(this, 'MyStack', {
  // stack properties
  synthesizer: new DefaultStackSynthesizer({
    // synthesizer properties
  }),
});
```

```
new MyStack(this, 'MyStack', {
  // stack properties
  synthesizer: new DefaultStackSynthesizer({
    // synthesizer properties
  }),
});
```

```
MyStack(self, "MyStack",
    # stack properties
    synthesizer=DefaultStackSynthesizer(
        # synthesizer properties
))
```

```
new MyStack(app, "MyStack", StackProps.builder()
  // stack properties
  .synthesizer(DefaultStackSynthesizer.Builder.create()
    // synthesizer properties
    .build())
  .build();
)
```

```
new MyStack(app, "MyStack", new StackProps
// stack properties
{
    Synthesizer = new DefaultStackSynthesizer(new DefaultStackSynthesizerProps
    {
        // synthesizer properties
    })
});
```

```
func main() {
  app := awscdk.NewApp(nil)

  NewMyStack(app, "MyStack", &MyStackProps{
    StackProps: awscdk.StackProps{
      Synthesizer: awscdk.NewDefaultStackSynthesizer(&awscdk.DefaultStackSynthesizerProps{
        // synthesizer properties
      }),
    },
  })

  app.Synth(nil)
}
```

Anda juga dapat mengonfigurasi synthesizer untuk semua tumpukan CDK di aplikasi CDK menggunakan properti instance Anda: `defaultStackSynthesizer` `App`

**Example**  

```
import { App, Stack, DefaultStackSynthesizer } from 'aws-cdk-lib';

const app = new App({
  // Configure for all stacks in this app
  defaultStackSynthesizer: new DefaultStackSynthesizer({
    /* ... */
  }),
});
```

```
const { App, Stack, DefaultStackSynthesizer } = require('aws-cdk-lib');

const app = new App({
  // Configure for all stacks in this app
  defaultStackSynthesizer: new DefaultStackSynthesizer({
    /* ... */
  }),
});
```

```
from aws_cdk import App, Stack, DefaultStackSynthesizer

app = App(
    default_stack_synthesizer=DefaultStackSynthesizer(
        # Configure for all stacks in this app
        # ...
    )
)
```

```
import software.amazon.awscdk.App;
import software.amazon.awscdk.Stack;
import software.amazon.awscdk.DefaultStackSynthesizer;

public class Main {
    public static void main(final String[] args) {
        App app = new App(AppProps.builder()
            // Configure for all stacks in this app
            .defaultStackSynthesizer(DefaultStackSynthesizer.Builder.create().build())
            .build()
        );
    }
}
```

```
using Amazon.CDK;
using Amazon.CDK.Synthesizers;

namespace MyNamespace
{
    sealed class Program
    {
        public static void Main(string[] args)
        {
            var app = new App(new AppProps
            {
                // Configure for all stacks in this app
                DefaultStackSynthesizer = new DefaultStackSynthesizer(new DefaultStackSynthesizerProps
                {
                    // ...
                })
            });
        }
    }
}
```

```
package main

import (
    "github.com/aws/aws-cdk-go/awscdk/v2"
    "github.com/aws/constructs-go/constructs/v10"
    "github.com/aws/jsii-runtime-go"
)

func main() {
    defer jsii.Close()

    app := awscdk.NewApp(&awscdk.AppProps{
        // Configure for all stacks in this app
        DefaultStackSynthesizer: awscdk.NewDefaultStackSynthesizer(&awscdk.DefaultStackSynthesizerProps{
            // ...
        }),
    })
}
```

Secara default, AWS CDK menggunakan` [`DefaultStackSynthesizer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.DefaultStackSynthesizer.html) `. Jika Anda tidak mengkonfigurasi synthesizer, synthesizer ini akan digunakan.

Jika Anda tidak memodifikasi bootstrap, seperti membuat perubahan pada tumpukan atau template bootstrap, Anda tidak perlu memodifikasi sintesis tumpukan. Anda bahkan tidak perlu menyediakan synthesizer. CDK akan menggunakan `DefaultStackSynthesizer` kelas default untuk mengonfigurasi sintesis tumpukan CDK untuk berinteraksi dengan benar dengan tumpukan bootstrap Anda.

## Cara mensintesis tumpukan CDK
<a name="configure-synth-stack"></a>

Untuk mensintesis tumpukan CDK, gunakan perintah AWS CDK Command Line Interface (CDK AWS CLI). `cdk synth` Untuk informasi selengkapnya tentang perintah ini, termasuk opsi yang dapat Anda gunakan dengan perintah ini, lihat [cdk synthesize](ref-cli-cmd-synth.md).

Jika aplikasi CDK berisi satu tumpukan, atau untuk mensintesis semua tumpukan, Anda tidak perlu memberikan nama tumpukan CDK sebagai argumen. Secara default, CDK CLI akan mensintesis tumpukan CDK Anda ke dalam templat. AWS CloudFormation Template `json` yang diformat untuk setiap tumpukan disimpan ke `cdk.out` direktori. Jika aplikasi Anda berisi satu tumpukan, templat yang `yaml` diformat akan dicetak. `stdout` Berikut ini adalah contohnya:

```
$ cdk synth
Resources:
  CDKMetadata:
    Type: AWS::CDK::Metadata
    Properties:
      Analytics: v2:deflate64:H4sIAAAAAAAA/unique-identifier
    Metadata:
      aws:cdk:path: CdkAppStack/CDKMetadata/Default
    Condition: CDKMetadataAvailable
    ...
```

Jika aplikasi CDK berisi beberapa tumpukan, Anda dapat memberikan ID logis tumpukan untuk mensintesis satu tumpukan. Berikut ini adalah contohnya:

```
$ cdk synth MyStackName
```

Jika Anda tidak mensintesis tumpukan dan menjalankannya`cdk deploy`, CDK CLI akan secara otomatis mensintesis tumpukan Anda sebelum penerapan.

## Bagaimana sintesis bekerja secara default
<a name="how-synth-default"></a><a name="how-synth-default-logical-ids"></a>

 **Dihasilkan logis IDs di AWS CloudFormation template Anda**   
Saat Anda mensintesis tumpukan CDK untuk menghasilkan CloudFormation templat, logis IDs dihasilkan dari sumber berikut, diformat sebagai: `construct-pathconstruct-IDunique-hash`  
+  **Construct path** — Seluruh path ke build di aplikasi CDK Anda. Jalur ini mengecualikan ID konstruksi L1, yang selalu `Resource` atau`Default`, dan ID tumpukan tingkat atas yang menjadi bagiannya.
+  **Construct ID** — ID yang Anda berikan sebagai argumen kedua saat membuat instance konstruksi Anda.
+  **Hash unik** — AWS CDK menghasilkan hash unik 8 karakter menggunakan algoritma hashing deterministik. Hash unik ini membantu memastikan bahwa nilai ID logis dalam template Anda unik satu sama lain. Perilaku deterministik dari generasi hash ini memastikan bahwa nilai ID logis yang dihasilkan untuk setiap konstruksi tetap sama setiap kali Anda melakukan sintesis. Nilai hash hanya akan berubah jika Anda memodifikasi nilai konstruksi tertentu seperti ID konstruksi Anda atau jalurnya.

  Logika IDs memiliki panjang maksimum 255 karakter. Oleh karena itu, AWS CDK akan memotong jalur konstruksi dan membangun ID jika perlu untuk tetap dalam batas itu.

  Berikut ini adalah contoh konstruksi yang mendefinisikan bucket Amazon Simple Storage Service (Amazon S3) Simple Storage Service (Amazon S3). Di sini, kami lulus `myBucket` sebagai ID untuk konstruksi kami:  
**Example**  

------
#### [ TypeScript ]

  ```
  import * as cdk from 'aws-cdk-lib';
  import { Construct} from 'constructs';
  import * as s3 from 'aws-cdk-lib/aws-s3';
  
  export class MyCdkAppStack extends cdk.Stack {
    constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
      super(scope, id, props);
  
      // Define the S3 bucket
      new s3.Bucket(this, 'myBucket', {
        versioned: true,
        removalPolicy: cdk.RemovalPolicy.DESTROY,
      });
    }
  }
  ```

------
#### [ JavaScript ]

  ```
  const cdk = require('aws-cdk-lib');
  const s3 = require('aws-cdk-lib/aws-s3');
  
  class MyCdkAppStack extends cdk.Stack {
  
    constructor(scope, id, props) {
      super(scope, id, props);
  
      new s3.Bucket(this, 'myBucket', {
        versioned: true,
        removalPolicy: cdk.RemovalPolicy.DESTROY,
      });
    }
  }
  
  module.exports = { MyCdkAppStack }
  ```

------
#### [ Python ]

  ```
  import aws_cdk as cdk
  from constructs import Construct
  from aws_cdk import Stack
  from aws_cdk import aws_s3 as s3
  
  class MyCdkAppStack(Stack):
    def __init__(self, scope: Construct, construct_id: str, **kwargs) - None:
      super().__init__(scope, construct_id, **kwargs)
  
      s3.Bucket(self, 'MyBucket',
        versioned=True,
        removal_policy=cdk.RemovalPolicy.DESTROY
      )
  ```

------
#### [ Java ]

  ```
  package com.myorg;
  
  import software.constructs.Construct;
  import software.amazon.awscdk.Stack;
  import software.amazon.awscdk.StackProps;
  import software.amazon.awscdk.services.s3.Bucket;
  import software.amazon.awscdk.services.s3.BucketProps;
  import software.amazon.awscdk.RemovalPolicy;
  
  public class MyCdkAppStack extends Stack {
      public MyCdkAppStack(final Construct scope, final String id) {
          this(scope, id, null);
      }
  
      public MyCdkAppStack(final Construct scope, final String id, final StackProps props) {
          super(scope, id, props);
  
          Bucket.Builder.create(this, "myBucket")
              .versioned(true)
              .removalPolicy(RemovalPolicy.DESTROY)
              .build();
      }
  }
  ```

------
#### [ C\$1 ]

  ```
  using Amazon.CDK;
  using Constructs;
  using Amazon.CDK.AWS.S3;
  
  namespace MyCdkApp
  {
      public class MyCdkAppStack : Stack
      {
          public MyCdkAppStack(Construct scope, string id, IStackProps props = null) : base(scope, id, props)
          {
              new Bucket(this, "myBucket", new BucketProps
              {
                  Versioned = true,
                  RemovalPolicy = RemovalPolicy.DESTROY
              });
          }
      }
  }
  ```

------
#### [ Go ]

  ```
  package main
  
  import (
      "github.com/aws/aws-cdk-go/awscdk/v2"
      "github.com/aws/aws-cdk-go/awscdk/v2/awss3"
      "github.com/aws/constructs-go/constructs/v10"
      "github.com/aws/jsii-runtime-go"
  )
  
  type MyCdkAppStackProps struct {
      awscdk.StackProps
  }
  
  func NewMyCdkAppStack(scope constructs.Construct, id string, props *MyCdkAppStackProps) awscdk.Stack {
      var sprops awscdk.StackProps
      if props != nil {
          sprops = props.StackProps
      }
      stack := awscdk.NewStack(scope, id, sprops)
  
      awss3.NewBucket(stack, jsii.String("myBucket"), awss3.BucketProps{
        Versioned: jsii.Bool(true),
        RemovalPolicy: awscdk.RemovalPolicy_DESTROY,
      })
  
      return stack
  }
  
  // ...
  ```

------

  Ketika kita menjalankan`cdk synth`, ID logis dalam format `myBucketunique-hash` akan dihasilkan. Berikut ini adalah contoh sumber daya ini dalam AWS CloudFormation template yang dihasilkan:

  ```
  Resources:
    myBucket5AF9C99B:
      Type: AWS::S3::Bucket
      Properties:
        VersioningConfiguration:
          Status: Enabled
      UpdateReplacePolicy: Delete
      DeletionPolicy: Delete
      Metadata:
        aws:cdk:path: S3BucketAppStack/myBucket/Resource
  ```

  Berikut ini adalah contoh konstruksi kustom bernama `Bar` yang mendefinisikan bucket Amazon S3. `Bar`Konstruksi mencakup konstruksi khusus `Foo` di jalurnya:  
**Example**  

------
#### [ TypeScript ]

  ```
  import * as cdk from 'aws-cdk-lib';
  import { Construct } from 'constructs';
  import * as s3 from 'aws-cdk-lib/aws-s3';
  
  // Define the Bar construct
  export class Bar extends Construct {
    constructor(scope: Construct, id: string) {
      super(scope, id);
  
      // Define an S3 bucket inside of Bar
      new s3.Bucket(this, 'Bucket', {
         versioned: true,
         removalPolicy: cdk.RemovalPolicy.DESTROY,
        } );
    }
  }
  
  // Define the Foo construct
  export class Foo extends Construct {
    constructor(scope: Construct, id: string) {
      super(scope, id);
  
      // Create an instance of Bar inside Foo
      new Bar(this, 'Bar');
    }
  }
  
  // Define the CDK stack
  export class MyCustomAppStack extends cdk.Stack {
    constructor(scope: Construct, id: string, props?: cdk.StackProps) {
      super(scope, id, props);
  
      // Instantiate Foo construct in the stack
      new Foo(this, 'Foo');
    }
  }
  ```

------
#### [ JavaScript ]

  ```
  const cdk = require('aws-cdk-lib');
  const s3 = require('aws-cdk-lib/aws-s3');
  const { Construct } = require('constructs');
  
  // Define the Bar construct
  class Bar extends Construct {
    constructor(scope, id) {
      super(scope, id);
  
      // Define an S3 bucket inside of Bar
      new s3.Bucket(this, 'Bucket', {
        versioned: true,
        removalPolicy: cdk.RemovalPolicy.DESTROY,
      });
    }
  }
  
  // Define the Foo construct
  class Foo extends Construct {
    constructor(scope, id) {
      super(scope, id);
  
      // Create an instance of Bar inside Foo
      new Bar(this, 'Bar');
    }
  }
  
  // Define the CDK stack
  class MyCustomAppStack extends cdk.Stack {
    constructor(scope, id, props) {
      super(scope, id, props);
  
      // Instantiate Foo construct in the stack
      new Foo(this, 'Foo');
    }
  }
  
  module.exports = { MyCustomAppStack }
  ```

------
#### [ Python ]

  ```
  import aws_cdk as cdk
  from constructs import Construct
  from aws_cdk import (
      Stack,
      aws_s3 as s3,
      RemovalPolicy,
  )
  
  # Define the Bar construct
  class Bar(Construct):
      def __init__(self, scope: Construct, id: str) - None:
          super().__init__(scope, id)
  
          # Define an S3 bucket inside of Bar
          s3.Bucket(self, 'Bucket',
              versioned=True,
              removal_policy=RemovalPolicy.DESTROY
          )
  
  # Define the Foo construct
  class Foo(Construct):
      def __init__(self, scope: Construct, id: str) - None:
          super().__init__(scope, id)
  
          # Create an instance of Bar inside Foo
          Bar(self, 'Bar')
  
  # Define the CDK stack
  class MyCustomAppStack(Stack):
      def __init__(self, scope: Construct, id: str, **kwargs) - None:
          super().__init__(scope, id, **kwargs)
  
          # Instantiate Foo construct in the stack
          Foo(self, 'Foo')
  ```

------
#### [ Java ]

  Dalam `my-custom-app/src/main/java/com/myorg/Bar.java`:

  ```
  package com.myorg;
  
  import software.constructs.Construct;
  import software.amazon.awscdk.services.s3.Bucket;
  import software.amazon.awscdk.services.s3.BucketProps;
  import software.amazon.awscdk.RemovalPolicy;
  
  public class Bar extends Construct {
      public Bar(final Construct scope, final String id) {
          super(scope, id);
  
          // Define an S3 bucket inside Bar
          Bucket.Builder.create(this, "Bucket")
              .versioned(true)
              .removalPolicy(RemovalPolicy.DESTROY)
              .build();
      }
  }
  ```

  Dalam `my-custom-app/src/main/java/com/myorg/Foo.java`:

  ```
  package com.myorg;
  
  import software.constructs.Construct;
  
  public class Foo extends Construct {
      public Foo(final Construct scope, final String id) {
          super(scope, id);
  
          // Create an instance of Bar inside Foo
          new Bar(this, "Bar");
      }
  }
  ```

  Dalam `my-custom-app/src/main/java/com/myorg/MyCustomAppStack.java`:

  ```
  package com.myorg;
  
  import software.constructs.Construct;
  import software.amazon.awscdk.Stack;
  import software.amazon.awscdk.StackProps;
  
  public class MyCustomAppStack extends Stack {
      public MyCustomAppStack(final Construct scope, final String id, final StackProps props) {
          super(scope, id, props);
  
          // Instantiate Foo construct in the stack
          new Foo(this, "Foo");
      }
  
      // Overload constructor in case StackProps is not provided
      public MyCustomAppStack(final Construct scope, final String id) {
          this(scope, id, null);
      }
  }
  ```

------
#### [ C\$1 ]

  ```
  using Amazon.CDK;
  using Constructs;
  using Amazon.CDK.AWS.S3;
  
  namespace MyCustomApp
  {
      // Define the Bar construct
      public class Bar : Construct
      {
          public Bar(Construct scope, string id) : base(scope, id)
          {
              // Define an S3 bucket inside Bar
              new Bucket(this, "Bucket", new BucketProps
              {
                  Versioned = true,
                  RemovalPolicy = RemovalPolicy.DESTROY
              });
          }
      }
  
      // Define the Foo construct
      public class Foo : Construct
      {
          public Foo(Construct scope, string id) : base(scope, id)
          {
              // Create an instance of Bar inside Foo
              new Bar(this, "Bar");
          }
      }
  
      // Define the CDK Stack
      public class MyCustomAppStack : Stack
      {
          public MyCustomAppStack(Construct scope, string id, StackProps props = null) : base(scope, id, props)
          {
              // Instantiate Foo construct in the stack
              new Foo(this, "Foo");
          }
      }
  }
  ```

------
#### [ Go ]

  ```
  package main
  
  import (
  	"github.com/aws/aws-cdk-go/awscdk/v2"
  	"github.com/aws/aws-cdk-go/awscdk/v2/awss3"
  	"github.com/aws/constructs-go/constructs/v10"
  	"github.com/aws/jsii-runtime-go"
  )
  
  // Define the Bar construct
  type Bar struct {
  	constructs.Construct
  }
  
  func NewBar(scope constructs.Construct, id string) constructs.Construct {
  	bar := constructs.NewConstruct(scope, id)
  
  	// Define an S3 bucket inside Bar
  	awss3.NewBucket(bar, jsii.String("Bucket"), awss3.BucketProps{
  		Versioned:     jsii.Bool(true),
  		RemovalPolicy: awscdk.RemovalPolicy_DESTROY,
  	})
  
  	return bar
  }
  
  // Define the Foo construct
  type Foo struct {
  	constructs.Construct
  }
  
  func NewFoo(scope constructs.Construct, id string) constructs.Construct {
  	foo := constructs.NewConstruct(scope, id)
  
  	// Create an instance of Bar inside Foo
  	NewBar(foo, "Bar")
  
  	return foo
  }
  
  // Define the CDK Stack
  type MyCustomAppStackProps struct {
  	awscdk.StackProps
  }
  
  func NewMyCustomAppStack(scope constructs.Construct, id string, props *MyCustomAppStackProps) awscdk.Stack {
  	stack := awscdk.NewStack(scope, id, props.StackProps)
  
  	// Instantiate Foo construct in the stack
  	NewFoo(stack, "Foo")
  
  	return stack
  }
  
  // Define the CDK App
  func main() {
  	app := awscdk.NewApp(nil)
  
  	NewMyCustomAppStack(app, "MyCustomAppStack", MyCustomAppStackProps{
  		StackProps: awscdk.StackProps{},
  	})
  
  	app.Synth(nil)
  }
  ```

------

  Ketika kita menjalankan`cdk synth`, ID logis dalam format `FooBarBucketunique-hash` akan dihasilkan. Berikut ini adalah contoh sumber daya ini dalam AWS CloudFormation template yang dihasilkan:

  ```
  Resources:
    FooBarBucketBA3ED1FA:
      Type: AWS::S3::Bucket
      Properties:
        VersioningConfiguration:
          Status: Enabled
      UpdateReplacePolicy: Delete
      DeletionPolicy: Delete
      # ...
  ```

## Sesuaikan sintesis tumpukan CDK
<a name="bootstrapping-custom-synth"></a>

Jika perilaku sintesis CDK default tidak sesuai dengan kebutuhan Anda, Anda dapat menyesuaikan sintesis CDK. Untuk melakukan ini, Anda memodifikasi`DefaultStackSynthesizer`, menggunakan synthesizer bawaan lain yang tersedia, atau membuat synthesizer Anda sendiri. Untuk petunjuk, lihat [Menyesuaikan sintesis tumpukan CDK](customize-synth.md).