Skip to content

Commit

Permalink
chore: fix typo in bucket error message (#30840)
Browse files Browse the repository at this point in the history
Minor typo fix in bucket error message

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
MarkPollmann committed Jul 12, 2024
1 parent 5ef3be5 commit 7ee8783
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-s3/lib/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2003,7 +2003,7 @@ export class Bucket extends BucketBase {

if (props.publicReadAccess) {
if (props.blockPublicAccess === undefined) {
throw new Error('Cannot use \'publicReadAccess\' property on a bucket without allowing bucket-level public access through \'blockPublicAceess\' property.');
throw new Error('Cannot use \'publicReadAccess\' property on a bucket without allowing bucket-level public access through \'blockPublicAccess\' property.');
}

this.grantPublicAccess();
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-s3/test/bucket.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ describe('bucket', () => {

expect(() => new s3.Bucket(stack, 'Bucket', {
publicReadAccess: true,
})).toThrow('Cannot use \'publicReadAccess\' property on a bucket without allowing bucket-level public access through \'blockPublicAceess\' property.');
})).toThrow('Cannot use \'publicReadAccess\' property on a bucket without allowing bucket-level public access through \'blockPublicAccess\' property.');
});

test('bucket with enabled block public access setting to throw error msg', () => {
Expand Down

0 comments on commit 7ee8783

Please sign in to comment.