Skip to content

Commit 551018b

Browse files
authored
2 parents a07d75a + c3318f3 commit 551018b

File tree

8 files changed

+34
-48
lines changed

8 files changed

+34
-48
lines changed

CHANGELOG.v2.alpha.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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.221.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.221.0-alpha.0...v2.221.1-alpha.0) (2025-10-29)
6+
57
## [2.221.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.220.0-alpha.0...v2.221.0-alpha.0) (2025-10-24)
68

79

CHANGELOG.v2.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
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.221.1](https://github.com/aws/aws-cdk/compare/v2.221.0...v2.221.1) (2025-10-29)
6+
7+
8+
### Bug Fixes
9+
10+
* compilation failure in Go ([#35871](https://github.com/aws/aws-cdk/issues/35871)) ([4379f66](https://github.com/aws/aws-cdk/commit/4379f66f42ee9adaffbc2836399c75f86d6bf784)), closes [aws/aws-cdk#35770](https://github.com/aws/aws-cdk/issues/35770) [#35862](https://github.com/aws/aws-cdk/issues/35862)
11+
512
## [2.221.0](https://github.com/aws/aws-cdk/compare/v2.220.0...v2.221.0) (2025-10-24)
613

714

815
### ⚠ BREAKING CHANGES
916

1017
* ** L1 resources are automatically generated from public CloudFormation Resource Schemas. They are built to closely reflect the real state of CloudFormation. Sometimes these updates can contain changes that are incompatible with previous types, but more accurately reflect reality. In this release we have changed:
1118
- **aws-datazone**: AWS::DataZone::ProjectProfile: Id property removed.
12-
- **aws-logs**: AWS::Logs::DeliveryDestination: DeliveryDestinationType attribute removed.
19+
- **aws-logs**: AWS::Logs::DeliveryDestination: DeliveryDestinationType attribute removed.
1320
- **aws-s3**: AWS::S3::AccessGrantsLocation: IamRoleArn property is now required.
1421
- **aws-s3**: AWS::S3::AccessGrantsLocation: LocationScope property is now required.
1522
- **aws-servicecatalog**: AWS::ServiceCatalog::TagOptionAssociation: Id attribute removed.
@@ -39,16 +46,16 @@ All notable changes to this project will be documented in this file. See [standa
3946

4047
### ⚠ BREAKING CHANGES
4148

42-
* **
49+
* **
4350
L1 resources are automatically generated from public CloudFormation Resource Schemas. They are built to closely reflect the real state of CloudFormation. Sometimes these updates can contain changes that are incompatible with previous types, but more accurately reflect reality. In this release we have changed:
4451

45-
- **aws-neptune**: AWS::Neptune::EventSubscription: SnsTopicArn property is now required.
46-
- **aws-neptune**: AWS::Neptune::EventSubscription: Id attribute removed.
52+
- **aws-neptune**: AWS::Neptune::EventSubscription: SnsTopicArn property is now required.
53+
- **aws-neptune**: AWS::Neptune::EventSubscription: Id attribute removed.
4754
- **aws-servicecatalog**: AWS::ServiceCatalog::PortfolioShare: Id attribute removed.
4855
- **aws-lex**: AWS::Lex::ResourcePolicy: ResourceArn property is now immutable.
4956

5057
Co-authored-by: aws-cdk-automation <[email protected]>
51-
* **
58+
* **
5259
### Features
5360

5461
* **batch:** ec2 Managed Compute Environment support default instance classes, deprecate `useOptimalInstanceClasses` ([#35537](https://github.com/aws/aws-cdk/issues/35537)) ([9d59dd8](https://github.com/aws/aws-cdk/commit/9d59dd8676bdfbba6f562d82411a527e1f7b6296)), closes [#35515](https://github.com/aws/aws-cdk/issues/35515)

allowed-breaking-changes.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,3 +966,6 @@ removed:aws-cdk-lib.lambda_layer_kubectl.KubectlLayer
966966
# Fixing the JsonSchema interface to be consistent with JSON Schema spec
967967
changed-type:aws-cdk-lib.aws_apigateway.JsonSchema.additionalItems
968968
strengthened:aws-cdk-lib.aws_apigateway.JsonSchema
969+
970+
# Revert a failing change
971+
strengthened:aws-cdk-lib.aws_stepfunctions.StateMachineProps

packages/aws-cdk-lib/aws-stepfunctions/lib/state-machine.ts

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export interface StateMachineProps {
117117
*
118118
* @default A role is automatically created
119119
*/
120-
readonly role?: iam.IRoleRef & iam.IGrantable;
120+
readonly role?: iam.IRole;
121121

122122
/**
123123
* Maximum run time for this state machine
@@ -427,6 +427,11 @@ export class StateMachine extends StateMachineBase {
427427
*/
428428
public static readonly PROPERTY_INJECTION_ID: string = 'aws-cdk-lib.aws-stepfunctions.StateMachine';
429429

430+
/**
431+
* Execution role of this state machine
432+
*/
433+
public readonly role: iam.IRole;
434+
430435
/**
431436
* The name of the state machine
432437
* @attribute
@@ -450,11 +455,6 @@ export class StateMachine extends StateMachineBase {
450455
*/
451456
public readonly stateMachineRevisionId: string;
452457

453-
/**
454-
* Execution role of this state machine
455-
*/
456-
private readonly _role: iam.IRoleRef & iam.IGrantable;
457-
458458
constructor(scope: Construct, id: string, props: StateMachineProps) {
459459
super(scope, id, {
460460
physicalName: props.stateMachineName,
@@ -476,7 +476,7 @@ export class StateMachine extends StateMachineBase {
476476
this.validateLogOptions(props.logs);
477477
}
478478

479-
this._role = props.role || new iam.Role(this, 'Role', {
479+
this.role = props.role || new iam.Role(this, 'Role', {
480480
assumedBy: new iam.ServicePrincipal('states.amazonaws.com'),
481481
});
482482

@@ -494,7 +494,7 @@ export class StateMachine extends StateMachineBase {
494494
}
495495

496496
if (props.encryptionConfiguration instanceof CustomerManagedEncryptionConfiguration) {
497-
this._role.grantPrincipal.addToPrincipalPolicy(new iam.PolicyStatement({
497+
this.role.addToPrincipalPolicy(new iam.PolicyStatement({
498498
effect: iam.Effect.ALLOW,
499499
actions: [
500500
'kms:Decrypt', 'kms:GenerateDataKey',
@@ -513,7 +513,7 @@ export class StateMachine extends StateMachineBase {
513513
}));
514514

515515
if (props.logs && props.logs.level !== LogLevel.OFF) {
516-
this._role.grantPrincipal.addToPrincipalPolicy(new iam.PolicyStatement({
516+
this.role.addToPrincipalPolicy(new iam.PolicyStatement({
517517
effect: iam.Effect.ALLOW,
518518
actions: [
519519
'kms:GenerateDataKey',
@@ -540,10 +540,10 @@ export class StateMachine extends StateMachineBase {
540540
const resource = new CfnStateMachine(this, 'Resource', {
541541
stateMachineName: this.physicalName,
542542
stateMachineType: props.stateMachineType ?? undefined,
543-
roleArn: this._role.roleRef.roleArn,
543+
roleArn: this.role.roleArn,
544544
loggingConfiguration: props.logs ? this.buildLoggingConfiguration(props.logs) : undefined,
545545
tracingConfiguration: this.buildTracingConfiguration(props.tracingEnabled),
546-
...definitionBody.bind(this, this._role.grantPrincipal, props, graph),
546+
...definitionBody.bind(this, this.role, props, graph),
547547
definitionSubstitutions: props.definitionSubstitutions,
548548
encryptionConfiguration: buildEncryptionConfiguration(props.encryptionConfiguration),
549549
});
@@ -569,27 +569,15 @@ export class StateMachine extends StateMachineBase {
569569
* The principal this state machine is running as
570570
*/
571571
public get grantPrincipal() {
572-
return this._role.grantPrincipal;
573-
}
574-
575-
/**
576-
* Execution role of this state machine
577-
*
578-
* Will throw if the Role object that was given does not implement IRole
579-
*/
580-
public get role(): iam.IRole {
581-
if (!isIRole(this._role)) {
582-
throw new ValidationError(`The role given to this StateMachine is not an IRole, but ${this._role.constructor.name}`, this);
583-
}
584-
return this._role;
572+
return this.role.grantPrincipal;
585573
}
586574

587575
/**
588576
* Add the given statement to the role's policy
589577
*/
590578
@MethodMetadata()
591579
public addToRolePolicy(statement: iam.PolicyStatement) {
592-
this._role.grantPrincipal.addToPrincipalPolicy(statement);
580+
this.role.addToPrincipalPolicy(statement);
593581
}
594582

595583
private validateStateMachineName(stateMachineName: string) {
@@ -858,9 +846,3 @@ export class ChainDefinitionBody extends DefinitionBody {
858846
};
859847
}
860848
}
861-
862-
function isIRole(x: iam.IRoleRef): x is iam.IRole {
863-
const xx = x as iam.IRole;
864-
return (!!xx.addManagedPolicy && !!xx.addToPrincipalPolicy && !!xx.assumeRoleAction && !!xx.attachInlinePolicy
865-
&& !!xx.grant && !!xx.policyFragment);
866-
}

packages/awslint/bin/awslint.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
/* eslint-disable no-console */
33
import * as child_process from 'child_process';
44
import * as path from 'path';
5-
import { JsiiFeature } from '@jsii/spec';
65
import * as chalk from 'chalk';
76
import * as fs from 'fs-extra';
87
import * as reflect from 'jsii-reflect';
98
import * as yargs from 'yargs';
109
import { ALL_RULES_LINTER, DiagnosticLevel, RuleFilterSet } from '../lib';
1110

12-
const FEATURES: JsiiFeature[] = ['intersection-types'];
13-
1411
let stackTrace = false;
1512

1613
async function main() {
@@ -250,7 +247,7 @@ main().catch(e => {
250247

251248
async function loadModule(dir: string) {
252249
const ts = new reflect.TypeSystem();
253-
await ts.load(dir, { validate: false, supportedFeatures: FEATURES }); // Don't validate to save 66% of execution time (20s vs 1min).
250+
await ts.load(dir, { validate: false }); // Don't validate to save 66% of execution time (20s vs 1min).
254251
// We run 'awslint' during build time, assemblies are guaranteed to be ok.
255252

256253
// We won't load any more assemblies. Lock the typesystem to benefit from performance improvements.

packages/awslint/lib/rules/api.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ apiLinter.add({
139139
return;
140140
}
141141

142-
if (type.intersectionOfTypes) {
143-
// Type intersections are okay
144-
return;
145-
}
146-
147142
throw new Error(`invalid type reference: ${type.toString()}`);
148143
}
149144
},

scripts/run-rosetta.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ time $ROSETTA extract \
7373

7474
if $infuse; then
7575
echo "💎 Generating synthetic examples for the remainder" >&2
76-
time npx cdk-generate-synthetic-examples \
76+
time npx cdk-generate-synthetic-examples@^0.1.292 \
7777
$(cat $jsii_pkgs_file)
7878

7979
time $ROSETTA extract \

version.v2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"version": "2.221.0",
3-
"alphaVersion": "2.221.0-alpha.0"
2+
"version": "2.221.1",
3+
"alphaVersion": "2.221.1-alpha.0"
44
}

0 commit comments

Comments
 (0)