Skip to content

Commit

Permalink
chore: fix typo in bucket error message
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkPollmann committed Jul 12, 2024
1 parent 5ef3be5 commit 20fb5eb
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 20fb5eb

Please sign in to comment.