Skip to content

Commit 77f838d

Browse files
authored
2 parents 073185d + 8e31156 commit 77f838d

File tree

11 files changed

+352
-37
lines changed

11 files changed

+352
-37
lines changed

CHANGELOG.v2.alpha.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
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.230.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.229.1-alpha.0...v2.230.0-alpha.0) (2025-11-26)
6+
7+
8+
### Features
9+
10+
* **bedrock-agentcore-alpha:** update resources on grantInvokeXXX for runtime ([#35864](https://github.com/aws/aws-cdk/issues/35864)) ([5dad62f](https://github.com/aws/aws-cdk/commit/5dad62f94c1a9f02c5fda1df7aa105e14630beb3))
11+
* **imagebuilder-alpha:** add support for Image Pipeline Construct ([#36153](https://github.com/aws/aws-cdk/issues/36153)) ([d8c324a](https://github.com/aws/aws-cdk/commit/d8c324ae31db5997f9511e3f43affceea57d86c3)), closes [aws/aws-cdk-rfcs#789](https://github.com/aws/aws-cdk-rfcs/issues/789) [aws/aws-cdk-rfcs#789](https://github.com/aws/aws-cdk-rfcs/issues/789)
12+
* **imagebuilder-alpha:** add support for Lifecycle Policy Construct ([#36152](https://github.com/aws/aws-cdk/issues/36152)) ([7e31eb6](https://github.com/aws/aws-cdk/commit/7e31eb6a310344634fefa0651bf55c7493fc09bd)), closes [aws/aws-cdk-rfcs#789](https://github.com/aws/aws-cdk-rfcs/issues/789) [aws/aws-cdk-rfcs#789](https://github.com/aws/aws-cdk-rfcs/issues/789)
13+
* **mixins-preview:** adds LogDelivery Mixins for 47 resources ([#36158](https://github.com/aws/aws-cdk/issues/36158)) ([6607ce9](https://github.com/aws/aws-cdk/commit/6607ce95256acda86107fa30b1f000a9dc189df7))
14+
* **mixins-preview:** vended log deliveries ([#36138](https://github.com/aws/aws-cdk/issues/36138)) ([69442a8](https://github.com/aws/aws-cdk/commit/69442a88b16b39d485bf7ec57d520599c564a612))
15+
* **mixins-preview:** helpers to generate EventBridge event patterns for 26 services ([#36121](https://github.com/aws/aws-cdk/issues/36121)) ([073185d](https://github.com/aws/aws-cdk/commit/073185d46e5d8a95915579013d1ef8fe47e6343c))
16+
17+
18+
### Bug Fixes
19+
20+
* **mixins-preview:** `AutoDeleteObjects` mixin fails with cannot find file error ([#36188](https://github.com/aws/aws-cdk/issues/36188)) ([3ef337d](https://github.com/aws/aws-cdk/commit/3ef337dba5d9f6f13ca8faa84376bd9177a7ecbd)), closes [aws-cdk/mixins-preview/lib/custom-resource-handlers/aws-s3/auto-delete-objects-provider.ts#L21](https://github.com/aws-cdk/mixins-preview/lib/custom-resource-handlers/aws-s3/auto-delete-objects-provider.ts/issues/L21)
21+
* **mixins-preview:** `ResourcePolicy with this name already exists` error when setting up `LogDelivery` ([#36195](https://github.com/aws/aws-cdk/issues/36195)) ([f9aa31d](https://github.com/aws/aws-cdk/commit/f9aa31d021400aee8e172b3b0c949cd2d00473f7))
22+
* **mixins-preview:** cannot use string literal types for `S3LogsDeliveryProps.permissionsVersion` ([#36197](https://github.com/aws/aws-cdk/issues/36197)) ([cc491df](https://github.com/aws/aws-cdk/commit/cc491df13f6a4e62e0233b90dcc636efa34e32d7))
23+
524
## [2.229.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.229.0-alpha.0...v2.229.1-alpha.0) (2025-11-25)
625

726
## [2.229.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.228.0-alpha.0...v2.229.0-alpha.0) (2025-11-24)

CHANGELOG.v2.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
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.230.0](https://github.com/aws/aws-cdk/compare/v2.229.1...v2.230.0) (2025-11-26)
6+
7+
8+
### Features
9+
10+
* **apigateway:** support response streaming with response transfer mode ([#36155](https://github.com/aws/aws-cdk/issues/36155)) ([f431021](https://github.com/aws/aws-cdk/commit/f4310219ae134a03693330cb55da5fa1cb789c48)), closes [#36156](https://github.com/aws/aws-cdk/issues/36156)
11+
* update L1 CloudFormation resource definitions ([f203b8e](https://github.com/aws/aws-cdk/commit/f203b8e2d1af592b70bfe8d1cafc496c5a28b0df))
12+
* update L1 CloudFormation resource definitions ([#36193](https://github.com/aws/aws-cdk/issues/36193)) ([d074024](https://github.com/aws/aws-cdk/commit/d0740240d4dc52524faa8328467c92c360f52cc8))
13+
* **events:** the L2 `EventPattern` interfaces can be used with `CfnRule` ([#36191](https://github.com/aws/aws-cdk/issues/36191)) ([efc135e](https://github.com/aws/aws-cdk/commit/efc135e60cacc55ccdf3b347c08fb78e5b735d3d))
14+
* update L1 CloudFormation resource definitions ([#36180](https://github.com/aws/aws-cdk/issues/36180)) ([5cddd7e](https://github.com/aws/aws-cdk/commit/5cddd7ec34392198436710635bcee1921ce35d10))
15+
16+
17+
### Bug Fixes
18+
19+
* **ecs:** wrong ARN generated in `Cluster.grantTaskProtection` method ([#36207](https://github.com/aws/aws-cdk/issues/36207)) ([9b337df](https://github.com/aws/aws-cdk/commit/9b337dfe2ca0a3920f9542802da73b670915fe01))
20+
* **ecs-patterns:** target group ID changes without setting feature flag ([#36199](https://github.com/aws/aws-cdk/issues/36199)) ([b7ca082](https://github.com/aws/aws-cdk/commit/b7ca082ec460db7eccd96661623fb7f7cb26c34e)), closes [#36149](https://github.com/aws/aws-cdk/issues/36149)
21+
* **scheduler:** wrong ARN generated in `ScheduleGroup.grant*` methods ([#36175](https://github.com/aws/aws-cdk/issues/36175)) ([eae8838](https://github.com/aws/aws-cdk/commit/eae88380aa71bd841279fdfa37120ed244dd5eae))
22+
523
## [2.229.1](https://github.com/aws/aws-cdk/compare/v2.229.0...v2.229.1) (2025-11-25)
624

725

packages/@aws-cdk/aws-imagebuilder-alpha/lib/image-pipeline.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as events from 'aws-cdk-lib/aws-events';
44
import * as iam from 'aws-cdk-lib/aws-iam';
55
import { CfnImagePipeline } from 'aws-cdk-lib/aws-imagebuilder';
66
import * as logs from 'aws-cdk-lib/aws-logs';
7+
import { addConstructMetadata, MethodMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';
78
import { propertyInjectable } from 'aws-cdk-lib/core/lib/prop-injectable';
89
import { Construct } from 'constructs';
910
import { IDistributionConfiguration } from './distribution-configuration';
@@ -636,6 +637,8 @@ export class ImagePipeline extends ImagePipelineBase {
636637
}).toLowerCase(), // Enforce lowercase for the auto-generated fallback
637638
}),
638639
});
640+
// Enhanced CDK Analytics Telemetry
641+
addConstructMetadata(this, props);
639642

640643
Object.defineProperty(this, IMAGE_PIPELINE_SYMBOL, { value: true });
641644

@@ -699,6 +702,7 @@ export class ImagePipeline extends ImagePipelineBase {
699702
*
700703
* @param grantee The execution role used for the image build.
701704
*/
705+
@MethodMetadata()
702706
public grantDefaultExecutionRolePermissions(grantee: iam.IGrantable): iam.Grant[] {
703707
const policies = defaultExecutionRolePolicy(this, this.props);
704708
return policies.map((policy) =>

packages/@aws-cdk/aws-imagebuilder-alpha/lib/lifecycle-policy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as cdk from 'aws-cdk-lib';
22
import * as iam from 'aws-cdk-lib/aws-iam';
33
import { CfnLifecyclePolicy } from 'aws-cdk-lib/aws-imagebuilder';
4+
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';
45
import { propertyInjectable } from 'aws-cdk-lib/core/lib/prop-injectable';
56
import { Construct } from 'constructs';
67
import { IRecipeBase } from './recipe-base';
@@ -432,6 +433,8 @@ export class LifecyclePolicy extends LifecyclePolicyBase {
432433
}).toLowerCase(),
433434
}),
434435
});
436+
// Enhanced CDK Analytics Telemetry
437+
addConstructMetadata(this, props);
435438

436439
Object.defineProperty(this, LIFECYCLE_POLICY_SYMBOL, { value: true });
437440

packages/@aws-cdk/mixins-preview/scripts/spec2eventbridge/builder.ts

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ class EventBridgeEventsClass extends ClassType {
179179
eventNsName,
180180
event,
181181
typeDef,
182+
addMetadata,
182183
}: {
183184
/** The interface or struct to add properties to */
184185
target: InterfaceType | StructType;
@@ -194,6 +195,7 @@ class EventBridgeEventsClass extends ClassType {
194195
event: Event;
195196
/** Type definition for resource field identification */
196197
typeDef: TypeDefinition;
198+
addMetadata: boolean;
197199
}): FreeFunction {
198200
const propertyMappings = new Map<string, { original: string; type: Type; resolver?: Expression }>();
199201
const module = Module.of(this);
@@ -228,6 +230,18 @@ class EventBridgeEventsClass extends ClassType {
228230
},
229231
});
230232
}
233+
if (addMetadata) {
234+
target.addProperty({
235+
name: 'eventMetadata',
236+
type: CDK_CORE.AWSEventMetadataProps,
237+
optional: true,
238+
immutable: true,
239+
docs: {
240+
summary: 'EventBridge event metadata',
241+
default: '-',
242+
},
243+
});
244+
}
231245

232246
// Generate converter function
233247
const converterFunction = new FreeFunction(module, {
@@ -329,6 +343,7 @@ class EventBridgeEventsClass extends ClassType {
329343
eventNsName,
330344
event,
331345
typeDef,
346+
addMetadata: false,
332347
});
333348
}
334349
};
@@ -364,10 +379,10 @@ class EventBridgeEventsClass extends ClassType {
364379

365380
// Create detail interface with event properties
366381
const detailInterface = new InterfaceType(eventNamespace, {
367-
name: `${namespaceName}Detail`,
382+
name: `${namespaceName}Props`,
368383
export: true,
369384
docs: {
370-
summary: `Detail type for ${this.resource.name} ${event.name} event`,
385+
summary: `Props type for ${this.resource.name} ${event.name} event`,
371386
},
372387
});
373388

@@ -380,26 +395,7 @@ class EventBridgeEventsClass extends ClassType {
380395
eventNsName: namespaceName,
381396
event,
382397
typeDef: rootProperty,
383-
});
384-
385-
// Create pattern props interface extending detail with metadata
386-
const propInterface = new InterfaceType(eventNamespace, {
387-
name: 'PatternProps',
388-
export: true,
389-
extends: [detailInterface.type],
390-
docs: {
391-
summary: `Properties for ${this.resource.name} ${event.name} event pattern`,
392-
},
393-
});
394-
propInterface.addProperty({
395-
name: 'eventMetadata',
396-
type: CDK_CORE.AWSEventMetadataProps,
397-
optional: true,
398-
immutable: true,
399-
docs: {
400-
summary: 'EventBridge event metadata',
401-
default: '-',
402-
},
398+
addMetadata: true,
403399
});
404400

405401
// Create event pattern method that returns events.EventPattern
@@ -411,27 +407,21 @@ class EventBridgeEventsClass extends ClassType {
411407
summary: `EventBridge event pattern for ${this.resource.name} ${event.detailType}`,
412408
},
413409
});
414-
const eventPatternMethodParam = eventPatternMethod.addParameter({
410+
eventPatternMethod.addParameter({
415411
name: 'options',
416-
type: propInterface.type,
412+
type: detailInterface.type,
417413
optional: true,
418414
});
419415

420-
const eventMetadata = expr.ident('eventMetadata');
421-
422416
eventPatternMethod.addBody(
423-
stmt.constVar(
424-
expr.destructuringObject(eventMetadata, expr.directCode('...obj')),
425-
expr.binOp(expr.ident(eventPatternMethodParam.spec.name), '||', expr.lit({})),
426-
),
427417
stmt.ret(
428418
expr.object({
429419
source: expr.list([expr.lit(event.source)]),
430420
detailType: expr.list([expr.lit(event.detailType)]),
431-
detail: expr.ident(converterFunction.name).call(expr.ident('obj'), expr.this_().prop(this.referenceName)),
432-
version: expr.directCode('eventMetadata?.version'),
433-
resources: expr.directCode('eventMetadata?.resources'),
434-
region: expr.directCode('eventMetadata?.region'),
421+
detail: expr.ident(converterFunction.name).call(expr.ident('options'), expr.this_().prop(this.referenceName)),
422+
version: expr.directCode('options?.eventMetadata?.version'),
423+
resources: expr.directCode('options?.eventMetadata?.resources'),
424+
region: expr.directCode('options?.eventMetadata?.region'),
435425
}),
436426
),
437427
);

packages/@aws-cdk/mixins-preview/test/events/l1-l2.test.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,36 @@ describe.each([
153153
},
154154
});
155155
});
156+
157+
test('should always have a bucketRef when empty props is passed', () => {
158+
// GIVEN
159+
const bucketEvents = BucketEvents.fromBucket(new class extends Construct {
160+
public readonly bucketRef = {
161+
bucketArn: 'arn',
162+
bucketName: 'the-bucket',
163+
};
164+
public readonly env = { account: '11111111111', region: 'us-east-1' };
165+
}(stack, 'Bucket'));
166+
167+
// WHEN
168+
newRule(stack, bucketEvents.objectCreatedPattern({
169+
eventMetadata: {
170+
region: ['my-region'],
171+
},
172+
}));
173+
174+
// THEN
175+
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
176+
EventPattern: {
177+
'detail-type': ['Object Created'],
178+
'source': ['aws.s3'],
179+
'detail': {
180+
bucket: { name: ['the-bucket'] },
181+
},
182+
'region': ['my-region'],
183+
},
184+
});
185+
});
156186
});
157187

158188
test('creates multiple rules for different event types', () => {

0 commit comments

Comments
 (0)