

Dies ist der AWS CDK v2-Entwicklerhandbuch. Das ältere CDK v1 wurde am 1. Juni 2022 in die Wartung aufgenommen und der Support wurde am 1. Juni 2023 eingestellt.

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# CDK-Stack-Synthese konfigurieren und durchführen
<a name="configure-synth"></a>

Bevor Sie einen AWS Cloud Development Kit (AWS CDK) -Stack bereitstellen können, muss er zunächst synthetisiert werden. Bei der *Stack-Synthese* werden eine AWS CloudFormation Vorlage und Bereitstellungsartefakte aus einem CDK-Stack erstellt. Die Vorlage und die Artefakte werden als *Cloud-Assembly* bezeichnet. Die Cloud-Assembly wird bereitgestellt, um Ihre Ressourcen bereitzustellen AWS. Weitere Informationen zur Funktionsweise von Bereitstellungen finden Sie unter [So funktionieren AWS CDK-Bereitstellungen](deploy.md#deploy-how).

## Wie Synthese und Bootstrapping zusammenarbeiten
<a name="configure-synth-bootstrap"></a>

Damit Ihre CDK-Apps ordnungsgemäß bereitgestellt werden können, müssen die während der Synthese erstellten CloudFormation Vorlagen die beim Bootstrapping erstellten Ressourcen korrekt spezifizieren. Daher müssen sich Bootstrapping und Synthese gegenseitig ergänzen, damit eine Bereitstellung erfolgreich ist:
+ Bootstrapping ist ein einmaliger Vorgang zum Einrichten einer AWS Umgebung für CDK-Bereitstellungen. AWS Es konfiguriert bestimmte AWS Ressourcen in Ihrer Umgebung, die vom CDK für Bereitstellungen verwendet werden. *Diese werden üblicherweise als Bootstrap-Ressourcen bezeichnet.* Anweisungen zum Bootstrapping finden Sie unter [Bootstrap your environment for use](bootstrapping-env.md) with the CDK. AWS 
+ CloudFormation Die während der Synthese erstellten Vorlagen enthalten Informationen darüber, welche Bootstrap-Ressourcen verwendet werden sollen. Während der Synthese weiß die CDK-CLI nicht genau, wie Ihre AWS Umgebung gebootet wurde. Stattdessen erstellt die CDK-CLI CloudFormation Vorlagen auf der Grundlage des Synthesizers, den Sie für jeden CDK-Stack konfigurieren. Damit eine Bereitstellung erfolgreich ist, muss der Synthesizer CloudFormation Vorlagen erstellen, die auf die richtigen zu verwendenden Bootstrap-Ressourcen verweisen.

Das CDK verfügt über eine Standardkonfiguration für Synthesizer und Bootstrapping, die so konzipiert sind, dass sie zusammenarbeiten. Wenn Sie eine anpassen, müssen Sie die entsprechenden Anpassungen auf die andere anwenden.

## Wie konfiguriert man die CDK-Stack-Synthese
<a name="bootstrapping-synthesizers"></a>

Sie konfigurieren die CDK-Stack-Synthese mithilfe der `synthesizer` Eigenschaft Ihrer [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)Instanz. Diese Eigenschaft gibt an, wie Ihre CDK-Stacks synthetisiert werden. Sie stellen eine Instanz einer Klasse bereit, die oder implementiert. [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) Ihre Methoden werden jedes Mal aufgerufen, wenn ein Asset zum Stack hinzugefügt wird oder wenn der Stack synthetisiert wird. Im Folgenden finden Sie ein grundlegendes Beispiel für die Verwendung dieser Eigenschaft in Ihrem Stack:

**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)
}
```

Sie können auch einen Synthesizer für alle CDK-Stacks in Ihrer CDK-App konfigurieren, indem Sie die `defaultStackSynthesizer` Eigenschaft Ihrer Instanz verwenden: `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{
            // ...
        }),
    })
}
```

Standardmäßig verwendet das CDK. AWS ` [`DefaultStackSynthesizer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.DefaultStackSynthesizer.html) ` Wenn Sie keinen Synthesizer konfigurieren, wird dieser Synthesizer verwendet.

Wenn Sie das Bootstrapping nicht ändern, z. B. Änderungen am Bootstrap-Stack oder der Vorlage vornehmen, müssen Sie die Stack-Synthese nicht ändern. Sie müssen nicht einmal einen Synthesizer bereitstellen. Das CDK verwendet die `DefaultStackSynthesizer` Standardklasse, um die CDK-Stack-Synthese so zu konfigurieren, dass sie ordnungsgemäß mit Ihrem Bootstrap-Stack interagiert.

## Wie synthetisiert man einen CDK-Stack
<a name="configure-synth-stack"></a>

Verwenden Sie den Befehl CDK Command Line Interface (AWS CDK CLI), um einen AWS CDK-Stack zu synthetisieren. `cdk synth` [Weitere Informationen zu diesem Befehl, einschließlich Optionen, die Sie mit diesem Befehl verwenden können, finden Sie unter cdk synthesize.](ref-cli-cmd-synth.md)

Wenn Ihre CDK-App einen einzelnen Stack enthält oder um alle Stapel zu synthetisieren, müssen Sie den CDK-Stacknamen nicht als Argument angeben. Standardmäßig synthetisiert die CDK-CLI Ihre CDK-Stacks zu Vorlagen. AWS CloudFormation Eine `json` formatierte Vorlage für jeden Stapel wird im Verzeichnis gespeichert. `cdk.out` Wenn Ihre App einen einzelnen Stapel enthält, wird eine `yaml` formatierte Vorlage gedruckt. `stdout` Im Folgenden wird ein Beispiel gezeigt:

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

Wenn Ihre CDK-App mehrere Stapel enthält, können Sie die logische ID eines Stacks angeben, um einen einzelnen Stapel zu synthetisieren. Im Folgenden wird ein Beispiel gezeigt:

```
$ cdk synth MyStackName
```

Wenn Sie keinen Stack synthetisieren und ausführen`cdk deploy`, synthetisiert die CDK-CLI Ihren Stack vor der Bereitstellung automatisch.

## So funktioniert die Synthese standardmäßig
<a name="how-synth-default"></a><a name="how-synth-default-logical-ids"></a>

 ** IDs In Ihrer AWS CloudFormation Vorlage logisch generiert**   
Wenn Sie einen CDK-Stack synthetisieren, um eine CloudFormation Vorlage zu erstellen, IDs werden logische Daten aus den folgenden Quellen generiert, formatiert als: `construct-pathconstruct-IDunique-hash`  
+  **Pfad erstellen** — Der gesamte Pfad zum Konstrukt in Ihrer CDK-App. Dieser Pfad schließt die ID des L1-Konstrukts, das immer `Resource` oder ist`Default`, und die ID des Stacks der obersten Ebene aus, zu dem es gehört.
+  **Konstrukt-ID** — Die ID, die Sie bei der Instanziierung Ihres Konstrukts als zweites Argument angeben.
+  **Eindeutiger Hash** — Das AWS CDK generiert mithilfe eines deterministischen Hash-Algorithmus einen eindeutigen Hash mit 8 Zeichen. Dieser eindeutige Hash trägt dazu bei, dass die logischen ID-Werte in Ihrer Vorlage voneinander eindeutig sind. Das deterministische Verhalten dieser Hash-Generierung stellt sicher, dass der generierte logische ID-Wert für jedes Konstrukt bei jeder Synthese derselbe bleibt. Der Hashwert ändert sich nur, wenn Sie bestimmte Konstruktwerte wie die ID oder den Pfad Ihres Konstrukts ändern.

  Logical IDs haben eine maximale Länge von 255 Zeichen. Daher kürzt das AWS CDK den Konstruktpfad und die Konstrukt-ID, falls erforderlich, um diese Grenze einzuhalten.

  Das Folgende ist ein Beispiel für ein Konstrukt, das einen Amazon Simple Storage Service (Amazon S3) -Bucket definiert. Hier übergeben wir `myBucket` als ID für unser Konstrukt:  
**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
  }
  
  // ...
  ```

------

  Wenn wir ausführen`cdk synth`, `myBucketunique-hash` wird eine logische ID im Format von generiert. Das Folgende ist ein Beispiel für diese Ressource in der generierten AWS CloudFormation Vorlage:

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

  Im Folgenden finden Sie ein Beispiel für ein benutzerdefiniertes Konstrukt mit dem Namen`Bar`, das einen Amazon S3 S3-Bucket definiert. Das `Bar` Konstrukt enthält das benutzerdefinierte Konstrukt `Foo` in seinem Pfad:  
**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 ]

  In `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();
      }
  }
  ```

  In `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");
      }
  }
  ```

  In `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)
  }
  ```

------

  Wenn wir ausführen`cdk synth`, `FooBarBucketunique-hash` wird eine logische ID im Format von generiert. Das Folgende ist ein Beispiel für diese Ressource in der generierten AWS CloudFormation Vorlage:

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

## Passen Sie die CDK-Stack-Synthese an
<a name="bootstrapping-custom-synth"></a>

Wenn das standardmäßige CDK-Syntheseverhalten nicht Ihren Anforderungen entspricht, können Sie die CDK-Synthese anpassen. Dazu modifizieren Sie`DefaultStackSynthesizer`, verwenden andere verfügbare integrierte Synthesizer oder erstellen Ihren eigenen Synthesizer. Anweisungen finden Sie unter [Anpassen der CDK-Stack-Synthese](customize-synth.md).