Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-events/lib/archive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class Archive extends Resource {
constructor(scope: Construct, id: string, props: ArchiveProps) {
super(scope, id, { physicalName: props.archiveName });

let archive = new CfnArchive(this, 'Archive', {
let archive = new CfnArchive(this, 'Default', {
sourceArn: props.sourceEventBus.eventBusArn,
description: props.description,
eventPattern: renderEventPattern(props.eventPattern),
Expand Down
16 changes: 16 additions & 0 deletions packages/@aws-cdk/aws-events/test/archive.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,20 @@ describe('archive', () => {
},
});
});

test('should have defined defaultChild', () => {
const stack = new Stack();

const eventBus = new EventBus(stack, 'Bus');

const archive = new Archive(stack, 'Archive', {
sourceEventBus: eventBus,
eventPattern: {
account: [stack.account],
},
retention: Duration.days(10),
});

expect(archive.node.defaultChild).toBeDefined();
});
});