@@ -199,15 +199,15 @@ the fact that the Bucket class needs the ARN or that it needs to request
199199encryption permissions are not the user's concern, and the API of the Bucket
200200class should not “leak” these implementation details. In the future, the Bucket
201201class can decide to interact differently with the ** key** and this won't require
202- expanding it's surface area. It also allows the ** Key** class to change it's
202+ expanding its surface area. It also allows the ** Key** class to change its
203203behavior (i.e. add an IAM action to enable encryption of certain types of keys)
204204without affecting the API of the consumer.
205205
206206#### Owned vs. Unowned Constructs
207207
208208Using object references instead of attribute references provides a richer API,
209209but also introduces an inherent challenge: how do we reference constructs that
210- are not defined inside the same app (“** owned** ” by the app). These could be
210+ are not defined inside the same app (“** owned** ” by the app)? These could be
211211resources that were created by some other AWS CDK app, via the AWS console,
212212etc. We call these ** “unowned” constructs.**
213213
@@ -272,7 +272,7 @@ as “props” (to distinguish them from JavaScript object properties).
272272Props are the most important aspect of designing a construct. Props are the
273273entry point of the construct. They should reflect the entire surface area of the
274274service through semantics that are intuitive to how developers perceive the
275- service and it's capabilities.
275+ service and its capabilities.
276276
277277When designing the props of an AWS resource, consult the AWS Console experience
278278for creating this resource. Service teams spend a lot of energy thinking about
@@ -300,15 +300,15 @@ API. In almost all cases, a richer object-oriented API can be exposed to
300300encapsulate the low-level surface [ _ awslint: props-no-cfn-types_ ] .
301301
302302Do not use the ** Token** type. It provides zero type safety, and is a functional
303- interface that may not translate cleanly in other JSII runtimes: ergo it should
303+ interface that may not translate cleanly in other JSII runtimes. Therefore, it should
304304be avoided wherever possible [ _ awslint: props-no-tokens_ ] .
305305
306306** deCDK** allows users to synthesize CDK stacks through a CloudFormation-like
307307 template, similar to SAM. CDK constructs are represented in deCDK templates
308308 like CloudFormation resources. Technically, this means that when a construct
309309 is defined, users supply an ID, type and a set of properties. In order to
310310 allow users to instantiate all AWS Construct Library constructs through the
311- deCDK syntax, we pose restrictions on prop types _ [ awslint: props-decdk ] _ :
311+ deCDK syntax, we impose restrictions on prop types _ [ awslint: props-decdk ] _ :
312312
313313* Primitives (string, number, boolean, date)
314314* Collections (list, map)
@@ -390,7 +390,7 @@ item). It just means that you can remove redundant context from the property
390390names. For example, there is no need to repeat the resource type, the property
391391type or indicate that this is a "configuration".
392392
393- For example prefer “readCapacity” versus “readCapacityUnits”.
393+ For example, prefer “readCapacity” versus “readCapacityUnits”.
394394
395395#### Naming
396396
@@ -546,7 +546,7 @@ be treated as an opaque token, the JSDoc “@returns” annotation should begin
546546
547547When an app defines a construct or resource, it specifies its provisioning
548548configuration upon initialization. For example, when an SQS queue is defined,
549- it's visibility timeout can be configured.
549+ its visibility timeout can be configured.
550550
551551Naturally, when constructs are imported (unowned), the importing app does not
552552have control over its configuration (e.g. you cannot change the visibility
@@ -609,17 +609,17 @@ consistency and interoperability, we allow mutating methods to be exposed on the
609609interface. For example, **grant** methods are exposed on the construct interface
610610and not on the concrete class. In most cases, when you grant a permission on an
611611AWS resource, the *principal's* policy needs to be updated, which mutates the
612- consumer . However, there are certain cases where a *resource policy* must be
612+ consumer. However, there are certain cases where a *resource policy* must be
613613updated. However, if the resource is unowned, it doesn't make sense (or even
614614impossible) to update its policy (there is usually a 1:1 relationship between a
615- resource and a resource policy). In such a case , we decided that grant methods
616- will simply skip any changes to resource policies, but will issue attach a
615+ resource and a resource policy). In such cases , we decided that grant methods
616+ will simply skip any changes to resource policies, but will attach a
617617**permission notice** to the app, which will be printed when the stack is
618618synthesized by the toolkit.
619619
620620### Factories
621621
622- In most AWS services, there's a one or more resource which can be referred to as
622+ In most AWS services, there are one or more resources which can be referred to as
623623“primary resources” (normally one), while other resources exposed by the service
624624can be considered “secondary resources”.
625625
@@ -687,7 +687,7 @@ their app.
687687The signature of all “from” methods should adhere to the following rules
688688_[awslint:from-signature]_:
689689
690- * First argument must be **scope** of type **Construct**
690+ * First argument must be **scope** of type **Construct**.
691691* Second argument is a **string**. This string will be used to determine the
692692 ID of the new construct. If the import method uses some value that is
693693 promised to be unique within the stack scope (such as ARN, export name),
@@ -697,8 +697,8 @@ _[awslint:from-signature]_:
697697#### “from” Methods
698698
699699Resource constructs should export static “from” methods for importing unowned
700- resources given one more of it's physical attributes such as ARN, name, etc. All
701- constructs should have at least one fromXxx method _[awslint:from-method]_:
700+ resources given one more of its physical attributes such as ARN, name, etc. All
701+ constructs should have at least one " fromXxx" method _[awslint:from-method]_:
702702
703703` ` ` ts
704704static fromFooArn (scope : Construct , id : string , bucketArn : string ): IFoo ;
@@ -713,7 +713,7 @@ static fromFooName(scope: Construct, id: string, bucketName: string): IFoo;
713713 doesn't have unresolved tokens (using **Token.unresolved**). Preferably, they
714714 can use **Stack.parseArn** to achieve this purpose.
715715
716- If a resource has an ARN attribute it should implement at least a **fromFooArn**
716+ If a resource has an ARN attribute, it should implement at least a **fromFooArn**
717717import method [_awslint:from-arn_].
718718
719719To implement **fromAttribute** methods, use the abstract base class construct as
@@ -769,7 +769,7 @@ interface FooProps {
769769}
770770` ` `
771771
772- The construct interface should expose a **role**property, and extends
772+ The construct interface should expose a **role** property, and extends
773773**iam.IGrantable** _[awslint:role-property]_:
774774
775775` ` ` ts
@@ -793,7 +793,7 @@ interface IFoo {
793793}
794794` ` `
795795
796- If the construct is unowned this method should no-op and issue a **permissions
796+ If the construct is unowned, this method should no-op and issue a **permissions
797797notice** (TODO) to the user indicating that they should ensure that the role of
798798this resource should have the specified permission.
799799
@@ -947,7 +947,7 @@ suffix and adhere to the following rules _[awslint:metrics-method-signature]:_
947947
948948* Name should be “metricXxx” where “Xxx” is the official metric name
949949* Accepts a single “options” argument of type **MetricOptions**
950- * Returns a **Metric** object.
950+ * Returns a **Metric** object
951951
952952` ` ` ts
953953interface IFunction {
@@ -1001,7 +1001,7 @@ extend **ec2.IConnectable** _[awslint:connectable-interface]_.
10011001
10021002### Integrations
10031003
1004- Many AWS services offer “integrations” to other services. For example, AWS
1004+ Many AWS services offer “integrations” with other services. For example, AWS
10051005CodePipeline has actions that can trigger AWS Lambda functions, ECS tasks,
10061006CodeBuild projects and more. AWS Lambda can be triggered by a variety of event
10071007sources, AWS CloudWatch event rules can trigger many types of targets, SNS can
@@ -1017,7 +1017,7 @@ the central service and can be triggered by multiple event sources.
10171017
10181018Integrations are an abstract concept, not necessarily a specific mechanism. For
10191019example, each AWS Lambda event source is implemented in a different way (SNS,
1020- Bucket notifications, CloudWatch events, etc), but conceptually, *some*users
1020+ Bucket notifications, CloudWatch events, etc), but conceptually, *some* users
10211021like to think about AWS Lambda as the “center”. It is also completely legitimate
10221022to have multiple ways to connect two services on AWS. To trigger an AWS Lambda
10231023function from an SNS topic, you could either use the integration or the SNS APIs
@@ -1102,7 +1102,7 @@ export class Table { }
11021102` ` `
11031103
11041104Persistent resources must have a **removalPolicy** prop, defaults to
1105- **Orphan**_[awslint:state-removal-policy-prop]_:
1105+ **Orphan** _[awslint:state-removal-policy-prop]_:
11061106
11071107` ` ` ts
11081108import { RemovalPolicy } from ' @aws-cdk/cdk' ;
@@ -1179,14 +1179,14 @@ implementation of AWS constructs.
11791179 not one that you made up and you force them to learn.
11801180* Multiple ways of achieving the same thing is legitimate.
11811181* Constantly maintain the invariants.
1182- * Fewer “if statements” the better.
1182+ * The fewer “if statements” the better.
11831183
11841184### Construct IDs
11851185
11861186Construct IDs (the second argument passed to all constructs when they are
11871187defined) are used to formulate resource logical IDs which must be **stable**
11881188across updates. The logical ID of a resource is calculated based on the **full
1189- path** of it's construct in the construct scope hierarchy. This means that any
1189+ path** of its construct in the construct scope hierarchy. This means that any
11901190change to a logical ID in this path will invalidate all the logical IDs within
11911191this scope. This will result in **replacements of all underlying resources**
11921192within the next update, which is extremely undesirable.
@@ -1196,7 +1196,7 @@ construct.
11961196
11971197Therefore, when implementing constructs, you should treat the construct
11981198hierarchy and all construct IDs as part of the **external contract** of the
1199- construct. Any chance to either should be considered and called out as a
1199+ construct. Any change to either should be considered and called out as a
12001200breaking change.
12011201
12021202There is no need to concatenate logical IDs. If you find yourself needing to
@@ -1226,10 +1226,10 @@ Error since all errors in the CDK are unrecoverable):
12261226* Include a descriptive message
12271227* Include the value provided
12281228* Include the expected/allowed values
1229- * No need to include information that can be obtained from the stack trace.
1230- * No need to add a period at the end of error messages.
1229+ * No need to include information that can be obtained from the stack trace
1230+ * No need to add a period at the end of error messages
12311231
1232- #### Avoid Errors if Possible
1232+ #### Avoid Errors If Possible
12331233
12341234Always prefer to do the right thing for the user instead of raising an
12351235error. Only fail if the user has explicitly specified bad configuration. For
0 commit comments