Skip to content

Commit 6fd29d4

Browse files
authored
Merge branch 'main' into fix-dynamo-grants
2 parents 87b9099 + b1b3f51 commit 6fd29d4

File tree

187 files changed

+73191
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+73191
-391
lines changed

.github/workflows/issue-label-assign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ env:
287287
{"area":"@aws-cdk/aws-location-alpha", "keywords":["aws-location", "aws-location-alpha"],"labels":["@aws-cdk/aws-location-alpha"]},
288288
{"area":"@aws-cdk/cli-lib-alpha", "keywords":["cli-lib", "cli-lib-alpha"],"labels":["@aws-cdk/cli-lib-alpha"]},
289289
{"area":"@aws-cdk/aws-applicationsignals-alpha", "keywords":["aws-applicationsignals", "aws-applicationsignals-alpha"],"labels":["@aws-cdk/aws-applicationsignals-alpha"]},
290-
{"area":"@aws-cdk/aws-s3tables-alpha", "keywords":["aws-s3tables", "aws-s3tables-alpha"],"labels":["@aws-cdk/aws-s3tables-alpha"]},
290+
{"area":"@aws-cdk/aws-s3tables-alpha", "keywords":["aws-s3tables", "aws-s3tables-alpha", "s3tables", "s3table"],"labels":["@aws-cdk/aws-s3tables-alpha"]},
291291
{"area":"@aws-cdk/aws-pipes-enrichments-alpha", "keywords":["aws-pipes-enrichments", "aws-pipes-enrichments-alpha"],"labels":["@aws-cdk/aws-pipes-enrichments-alpha"]},
292292
{"area":"@aws-cdk/aws-pipes-sources-alpha", "keywords":["aws-pipes-sources", "aws-pipes-sources-alpha"],"labels":["@aws-cdk/aws-pipes-sources-alpha"]},
293293
{"area":"@aws-cdk/aws-pipes-targets-alpha", "keywords":["aws-pipes-targets", "aws-pipes-targets-alpha"],"labels":["@aws-cdk/aws-pipes-targets-alpha"]},

CHANGELOG.v2.alpha.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.245.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.244.0-alpha.0...v2.245.0-alpha.0) (2026-03-27)
6+
7+
8+
### Features
9+
10+
* **s3tables-alpha:** add support for partition spec, sort order, and table properties ([#36811](https://github.com/aws/aws-cdk/issues/36811)) ([2696cd1](https://github.com/aws/aws-cdk/commit/2696cd16e8e2edc8d40f1443b9c87eb6171e5d1f))
11+
* **s3tables-alpha:** add metrics configuration support for TableBucket ([#37275](https://github.com/aws/aws-cdk/issues/37275)) ([e8786f5](https://github.com/aws/aws-cdk/commit/e8786f5d782d906971f933a2d6d432309d5384d7))
12+
* **s3tables-alpha:** implement ITaggableV2 on TableBucket and Table L2 constructs ([#37277](https://github.com/aws/aws-cdk/issues/37277)) ([69c8944](https://github.com/aws/aws-cdk/commit/69c8944ea3f4abf0f4218af2fc42c8e862e8cad3)), closes [#33054](https://github.com/aws/aws-cdk/issues/33054)
13+
514
## [2.244.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.243.0-alpha.0...v2.244.0-alpha.0) (2026-03-19)
615

716

CHANGELOG.v2.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.245.0](https://github.com/aws/aws-cdk/compare/v2.244.0...v2.245.0) (2026-03-27)
6+
7+
8+
### Features
9+
10+
* update L1 CloudFormation resource definitions ([#37332](https://github.com/aws/aws-cdk/issues/37332)) ([6cdf84a](https://github.com/aws/aws-cdk/commit/6cdf84aa9a50ef41dae54f14c2bcf4f48d46dbd1))
11+
* **autoscaling:** add instanceLifecyclePolicy support to AutoScalingGroup Property ([#36434](https://github.com/aws/aws-cdk/issues/36434)) ([b72ffcc](https://github.com/aws/aws-cdk/commit/b72ffcc343a7bff1745dfea4d1e8de4a0d6b998e))
12+
* **cloudfront:** use JavaScript runtime 2.0 as the default for CloudFront Functions (under feature flag) ([#35941](https://github.com/aws/aws-cdk/issues/35941)) ([cd0df14](https://github.com/aws/aws-cdk/commit/cd0df148fdb0d48b14d7d161641519942083b879))
13+
* **core:** add source tracing for L1 construct property mutations ([#37285](https://github.com/aws/aws-cdk/issues/37285)) ([f0b6da8](https://github.com/aws/aws-cdk/commit/f0b6da82b49da6611f871b67497db8d5004738a2))
14+
* **ecr-assets:** add support for docker build context ([#36930](https://github.com/aws/aws-cdk/issues/36930)) ([c0849ea](https://github.com/aws/aws-cdk/commit/c0849ea241c8f8707b26f07239aa1078b196bf1c)), closes [#31598](https://github.com/aws/aws-cdk/issues/31598)
15+
* **s3:** add blockedEncryptionTypes field to s3.Bucket ([#37047](https://github.com/aws/aws-cdk/issues/37047)) ([262e8a7](https://github.com/aws/aws-cdk/commit/262e8a76e7f50cefeceff265c7d135f35c0d520f)), closes [#36988](https://github.com/aws/aws-cdk/issues/36988)
16+
* **synthetics:** add enum value for Synthetics Canary NodeJS 3.1 runtime ([#37282](https://github.com/aws/aws-cdk/issues/37282)) ([af1e89c](https://github.com/aws/aws-cdk/commit/af1e89cbf7d9d96f0c23f05fb8bdca0e9d442b7d)), closes [/docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_Nodejs.html#CloudWatch_Synthetics_runtimeversion-syn-nodejs-3](https://github.com/aws//docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_Nodejs.html/issues/CloudWatch_Synthetics_runtimeversion-syn-nodejs-3)
17+
18+
19+
### Bug Fixes
20+
21+
* **aws-cdk-lib:** toolkit is unaware of CDK app errors ([#37294](https://github.com/aws/aws-cdk/issues/37294)) ([093de92](https://github.com/aws/aws-cdk/commit/093de927b4b5d0d0ad5c68580af1c7e7f56e12c6))
22+
* **eks:** throw error when kubectl subnets are isolated ([#37217](https://github.com/aws/aws-cdk/issues/37217)) ([73e5006](https://github.com/aws/aws-cdk/commit/73e50061168fc147d6af5fb60917ef003d385fd2)), closes [#26613](https://github.com/aws/aws-cdk/issues/26613)
23+
* **lambda:** fix typo in addPermission() warning message ([#37365](https://github.com/aws/aws-cdk/issues/37365)) ([fa21e62](https://github.com/aws/aws-cdk/commit/fa21e623484ad1ed191e542e93b16811a8ef08b6))
24+
* **lambda-nodejs:** use direct spawn for local bundling ([#37292](https://github.com/aws/aws-cdk/issues/37292)) ([9bf4263](https://github.com/aws/aws-cdk/commit/9bf4263ea631cae7c0cfff8872ec4fb3a3164cc1))
25+
* **mixin:** use withMixin in Stack to set mixin metadata in its constructs ([#37269](https://github.com/aws/aws-cdk/issues/37269)) ([293ce90](https://github.com/aws/aws-cdk/commit/293ce907d6c01e91e7f78bf9590e05aef4ae89a7)), closes [/github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/core/lib/mixins/private/mixin-metadata.ts#L30](https://github.com/aws//github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/core/lib/mixins/private/mixin-metadata.ts/issues/L30)
26+
* **rds:** enablePerformanceInsights false is ignored when other performance insight properties are set ([#37287](https://github.com/aws/aws-cdk/issues/37287)) ([b4bca75](https://github.com/aws/aws-cdk/commit/b4bca75d23832576840e6780bf5a62c260761cd7)), closes [#37051](https://github.com/aws/aws-cdk/issues/37051)
27+
* construct errors are rendered in a messy way ([#37290](https://github.com/aws/aws-cdk/issues/37290)) ([5104256](https://github.com/aws/aws-cdk/commit/5104256853a1cede1494ff065e9ce7abbce69e58))
28+
* **spec2cdk:** throw on unrecognized uppercase prefix in event pattern ([#37283](https://github.com/aws/aws-cdk/issues/37283)) ([c68f2f5](https://github.com/aws/aws-cdk/commit/c68f2f5961b24fba3f4a4b769e355b00d91fd6a1))
29+
530
## [2.244.0](https://github.com/aws/aws-cdk/compare/v2.243.0...v2.244.0) (2026-03-19)
631

732

aws-cdk.code-workspace

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"jest.runMode": {
77
"type": "on-demand"
88
},
9+
"eslint.useFlatConfig": true,
10+
"eslint.format.enable": true,
911
"jest.virtualFolders": [
1012
{
1113
"name": "aws-cdk-lib",

docs/DESIGN_GUIDELINES.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ experience across the entire AWS surface area.
3939
- [Prefer Additions](#prefer-additions)
4040
- [Dropped Mutations](#dropped-mutations)
4141
- [Factories](#factories)
42-
- [Imports](#imports)
42+
- [Referenced Resources](#referenced-resources)
4343
- [“from” Methods](#from-methods)
4444
- [From-attributes](#from-attributes)
4545
- [Roles](#roles)
@@ -1271,25 +1271,30 @@ export interface ILogGroup {
12711271
}
12721272
```
12731273

1274-
### Imports
1274+
### Referenced resources
1275+
1276+
> "Referenced resources" were formerly called "imported resources", but that may lead to confusion
1277+
> because there is also a feature called "cdk import" that actually brings unowned
1278+
> resources under CloudFormation's control. Therefore the current preferred terminology
1279+
> here has changed to "referencing" instead.
12751280
12761281
Construct classes should expose a set of static factory methods with a
1277-
**from**” prefix that will allow users to import *unowned* constructs into
1282+
**from**” prefix that will allow users to reference *unowned* constructs into
12781283
their app.
12791284

12801285
The signature of all “from” methods should adhere to the following rules
12811286
_[awslint:from-signature]_:
12821287

12831288
* First argument must be **scope** of type **Construct**.
12841289
* Second argument is a **string**. This string will be used to determine the
1285-
ID of the new construct. If the import method uses some value that is
1290+
ID of the new construct. If the referencing method uses some value that is
12861291
promised to be unique within the stack scope (such as ARN, export name),
12871292
this value can be reused as the construct ID.
12881293
* Returns an object that implements the construct interface (**IFoo**).
12891294

12901295
#### “from” Methods
12911296

1292-
Resource constructs should export static “from” methods for importing unowned
1297+
Resource constructs should export static “from” methods for referencing unowned
12931298
resources given one or more of its physical attributes such as ARN, name, etc. All
12941299
constructs should have at least one `fromXxx` method _[awslint:from-method]_:
12951300

@@ -1307,7 +1312,7 @@ static fromFooName(scope: Construct, id: string, bucketName: string): IFoo;
13071312
can use **Stack.parseArn** to achieve this purpose.
13081313

13091314
If a resource has an ARN attribute, it should implement at least a **fromFooArn**
1310-
import method [_awslint:from-arn_].
1315+
referencing method [_awslint:from-arn_].
13111316

13121317
To implement **fromAttribute** methods, use the abstract base class construct as
13131318
follows:
@@ -1333,7 +1338,7 @@ If a resource has more than a single attribute (“ARN” and “name” are usu
13331338
considered a single attribute since it's usually possible to convert one to the
13341339
other), then the resource should provide a static **fromAttributes** method to
13351340
allow users to explicitly supply values to all resource attributes when they
1336-
import an external (unowned) resource [_awslint:from-attributes_].
1341+
reference an external (unowned) resource [_awslint:from-attributes_].
13371342

13381343
```ts
13391344
static fromFooAttributes(scope: Construct, id: string, attrs: FooAttributes): IFoo;
@@ -1348,29 +1353,33 @@ the user.
13481353
Constructs that represent such resources should conform to the following
13491354
guidelines.
13501355

1351-
An optional prop called **role** of type **iam.IRole** should be exposed to allow
1356+
An optional prop called **role** of type **iam.IRoleRef** should be exposed to allow
13521357
users to "bring their own role", and use either an owned or unowned role
13531358
_[awslint:role-config-prop]_.
13541359

1360+
If the construct is going to grant permissions to the role, which is usually the case,
1361+
the type should include **iam.IGrantable**, in a type intersection as follows:
1362+
13551363
```ts
13561364
interface FooProps {
13571365
/**
13581366
* The role to associate with foo.
1367+
*
13591368
* @default - a role will be automatically created
13601369
*/
1361-
role?: iam.IRole;
1370+
role?: iam.IRoleRef & iam.IGrantable;
13621371
}
13631372
```
13641373

1365-
The construct interface should expose a **role** property, and extends
1374+
The construct interface should expose a **role** property, and extend
13661375
**iam.IGrantable** _[awslint:role-property]_:
13671376

13681377
```ts
13691378
interface IFoo extends iam.IGrantable {
13701379
/**
1371-
* The role associated with foo. If foo is imported, no role will be available.
1380+
* The role associated with foo. If foo is an unowned resource, no role will be available.
13721381
*/
1373-
readonly role?: iam.IRole;
1382+
readonly role?: iam.IRoleRef;
13741383
}
13751384
```
13761385

@@ -1392,7 +1401,7 @@ this resource should have the specified permission.
13921401

13931402
Implementing **IGrantable** brings an implementation burden of **grantPrincipal:
13941403
IPrincipal**. This property must be set to the **role** if available, or to a
1395-
new **iam.ImportedResourcePrincipal** if the resource is imported and the role
1404+
new **iam.ImportedResourcePrincipal** if the resource is referenced and the role
13961405
is not available.
13971406

13981407
### Resource Policies
@@ -1513,7 +1522,7 @@ To enable grant methods to work with L1 constructs, the CDK uses factory
15131522
interfaces called [Traits](#traits) that wrap L1 resources into objects
15141523
exposing higher-level interfaces:
15151524

1516-
- `IResourcePolicyFactory` wraps an L1 into an object implementing `IResourceWithPolicyV2`, enabling resource policy
1525+
- `IResourcePolicyFactory` wraps an L1 into an object implementing `IResourceWithPolicyV2`, enabling resource policy
15171526
manipulation.
15181527
- `IEncryptedResourceFactory` wraps an L1 into an object implementing `IEncryptedResource`, enabling KMS key grants.
15191528

@@ -1542,7 +1551,7 @@ class MyFactory implements IResourcePolicyFactory {
15421551
}
15431552
}
15441553

1545-
// After this, every time the Grants class encounters a CfnResource of type 'AWS::Some::Type',
1554+
// After this, every time the Grants class encounters a CfnResource of type 'AWS::Some::Type',
15461555
// it will be able to use MyFactory to attempt to add statements to its resource policy.
15471556
ResourceWithPolicies.register(scope, 'AWS::Some::Type', new MyFactory());
15481557
```
@@ -1580,8 +1589,8 @@ where:
15801589
* `Topic` - the class to generate grants for. This will lead to a class named TopicGrants.
15811590
* `isEncrypted` - indicates whether the resource is encrypted with a KMS key. When true, the `actions()` method will
15821591
have an `options` parameter of type `EncryptedPermissionOptions` that allows users to specify additional KMS permissions
1583-
to be granted on the key. If left undefined, but at least one grant method includes `keyActions`, the CDK will assume
1584-
that the resource is encrypted and the same behavior will apply. Note that if `isEncrypted` is explicitly set to false,
1592+
to be granted on the key. If left undefined, but at least one grant method includes `keyActions`, the CDK will assume
1593+
that the resource is encrypted and the same behavior will apply. Note that if `isEncrypted` is explicitly set to false,
15851594
it is an error to specify `keyActions` in any of the grants.
15861595
* `hasResourcePolicy` - indicates whether the resource supports a resource policy. When true, all auto-generated methods in the Grants class will attempt to add statements to the resource policy when applicable. When false, the methods will only modify the principal's policy.
15871596
* `publish` - the name of a grant.
@@ -1592,13 +1601,13 @@ it is an error to specify `keyActions` in any of the grants.
15921601

15931602
Code generated from the `grants.json` file will have a very basic logic: it will try to add the given statement to the
15941603
principal's policy. If `hasResourcePolicy` is true, it will also attempt to add the statement to the resource policy.
1595-
This will only work if the resource implements the `iam.IResourceWithPolicyV2` interface or -- in case of L1s -- if
1604+
This will only work if the resource implements the `iam.IResourceWithPolicyV2` interface or -- in case of L1s -- if
15961605
there is a `IResourcePolicyFactory` registered for its type (see previous section). If `keyActions` are specified in the
1597-
JSON file, it will also attempt to grant the specified permissions on the associated KMS key, if the resource implements
1606+
JSON file, it will also attempt to grant the specified permissions on the associated KMS key, if the resource implements
15981607
the `iam.IEncryptedResource` interface (or, similarly to resource policies, if there is a `IEncryptedResourceFactory`
15991608
registered for it).
16001609

1601-
If your permission use case requires additional logic, such as combining multiple `Grant` instances or handling
1610+
If your permission use case requires additional logic, such as combining multiple `Grant` instances or handling
16021611
additional parameters, you will need to implement the Grants class manually.
16031612

16041613
Historically, grant methods were implemented directly on the resource construct interface (e.g.

packages/@aws-cdk-testing/framework-integ/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"license": "Apache-2.0",
3131
"devDependencies": {
3232
"@aws-cdk/cdk-build-tools": "0.0.0",
33-
"@aws-cdk/integ-runner": "^2.196.1",
33+
"@aws-cdk/integ-runner": "^2.197.1",
3434
"@aws-cdk/pkglint": "0.0.0",
3535
"@aws-sdk/client-acm": "3.632.0",
3636
"@aws-sdk/client-ec2": "3.632.0",

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-instance-lifecycle-policy.js.snapshot/InstanceLifecyclePolicyTestDefaultTestDeployAssert4462AE17.assets.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-instance-lifecycle-policy.js.snapshot/InstanceLifecyclePolicyTestDefaultTestDeployAssert4462AE17.template.json

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-instance-lifecycle-policy.js.snapshot/aws-cdk-autoscaling-instance-lifecycle-policy.assets.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)