Skip to content

Commit

Permalink
fix(aws-s3): remove policy argument (#730)
Browse files Browse the repository at this point in the history
This argument served as a red herring, and made it harder
for people to find the correct method of setting a bucket
policy, by calling `addToPolicy()`.

The provided method of providing an existing Policy object on object
creation cannot actually work, because a `BucketPolicy` object requires
the `Bucket` instance as a constructor argument, which means the
`Bucket` object cannot take a `BucketPolicy` in its constructor.

Fixes #672.
  • Loading branch information
rix0rrr authored Sep 17, 2018
1 parent 8e8c295 commit a79190c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/@aws-cdk/aws-s3/lib/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,6 @@ export interface BucketProps {
*/
removalPolicy?: cdk.RemovalPolicy;

/**
* The bucket policy associated with this bucket.
*
* @default A bucket policy will be created automatically in the first call
* to addToPolicy.
*/
policy?: BucketPolicy;

/**
* Whether this bucket should have versioning turned on or not.
*
Expand Down Expand Up @@ -379,7 +371,6 @@ export class Bucket extends BucketRef {
cdk.applyRemovalPolicy(resource, props.removalPolicy);

this.versioned = props.versioned;
this.policy = props.policy;
this.encryptionKey = encryptionKey;
this.bucketArn = resource.bucketArn;
this.bucketName = resource.ref;
Expand Down

0 comments on commit a79190c

Please sign in to comment.