How to use the @aws-cdk/aws-s3.CfnBucket function in @aws-cdk/aws-s3

To help you get started, we’ve selected a few @aws-cdk/aws-s3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / examples / cdk-examples-typescript / custom-resource / index.ts View on Github external
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const resource = new DemoResource(this, 'DemoResource', {
      message: 'CustomResource says hello',
    });

    // Bucket with an invalid name will fail the deployment and cause a rollback
    const bucket = new CfnBucket(this, 'FailingBucket', {
      bucketName: 'hello!@#$^'
    });

    // Make sure the rollback gets triggered only after the custom resource has been fully created.
    bucket.node.addDependency(resource);
  }
}

@aws-cdk/aws-s3

The CDK Construct Library for AWS::S3

Apache-2.0
Latest version published 11 months ago

Package Health Score

70 / 100
Full package analysis