Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cdk-lib): fix typos #33008

Merged
merged 14 commits into from
Feb 14, 2025
Merged
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ In a cross-account scenario, where the source and destination buckets are owned
For more information, please refer to https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication-walkthrough-2.html .
> **NOTE:** AWS managed keys don't allow cross-account use, and therefore can't be used to perform cross-account replication.
If you need to ovveride the bucket ownership to destination account pass the account value to the method to provide permissions to override bucket owner.
If you need to override the bucket ownership to destination account pass the account value to the method to provide permissions to override bucket owner.
`addReplicationPolicy(bucket.replicationRoleArn, true, '11111111111')`;


Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-s3/lib/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export interface IBucket extends IResource {
* Function to add required permissions to the destination bucket for cross account
* replication. These permissions will be added as a resource based policy on the bucket.
* @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication-walkthrough-2.html
* If owner of the bucket needs to be overriden, set accessControlTransition to true and provide
* If owner of the bucket needs to be overridden, set accessControlTransition to true and provide
* account ID in which destination bucket is hosted. For more information on accessControlTransition
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.html
*/
Expand Down Expand Up @@ -964,7 +964,7 @@ export abstract class BucketBase extends Resource implements IBucket {
* Function to add required permissions to the destination bucket for cross account
* replication. These permissions will be added as a resource based policy on the bucket
* @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication-walkthrough-2.html
* If owner of the bucket needs to be overriden, set accessControlTransition to true and provide
* If owner of the bucket needs to be overridden, set accessControlTransition to true and provide
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see other 5 occurrences of this typo in the project. Can you please adjust those as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I fix it.

* account ID in which destination bucket is hosted. For more information on accessControlTransition
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.html
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/aws-cdk-lib/aws-s3/test/notification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('notification', () => {
}),
});

// THEN - Following is warning throwen as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
// THEN - Following is warning thrown as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
const warningFromStack = Annotations.fromStack(stack).findWarning('*', {});
expect(warningFromStack[0]?.entry?.data).toEqual(undefined);
});
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('notification', () => {
}),
});

// THEN - Following is warning throwen as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
// THEN - Following is warning thrown as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
const warningMessage = { 'Fn::Join': ['', ["Can't combine imported IManagedPolicy: arn:", { Ref: 'AWS::Partition' }, ':iam::aws:policy/service-role/AWSLambdaBasicExecutionRole to imported role IRole: DevsNotAllowedToTouch. Use ManagedPolicy directly. [ack: @aws-cdk/aws-iam:IRoleCantBeUsedWithIManagedPolicy]']] };
const warningFromStack = Annotations.fromStack(stack).findWarning('*', {});
expect(warningFromStack[0].entry.data).toEqual(warningMessage);
Expand Down Expand Up @@ -238,7 +238,7 @@ describe('notification', () => {
}),
});

// THEN - Following is warning throwen as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
// THEN - Following is warning thrown as a part of fix in : https://github.com/aws/aws-cdk/pull/31212
const warningFromStack = Annotations.fromStack(stack).findWarning('*', {});
expect(warningFromStack[0]?.entry?.data).toEqual(undefined);
});
Expand Down
Loading