Skip to content

Instantly share code, notes, and snippets.

@mrpackethead
Last active July 9, 2022 01:48
Show Gist options
  • Save mrpackethead/b4a7806ad29f6535cfac4eeb89de5c34 to your computer and use it in GitHub Desktop.
Save mrpackethead/b4a7806ad29f6535cfac4eeb89de5c34 to your computer and use it in GitHub Desktop.
const cTNewAccountRule = new events.Rule(this, 'ControlTowerEventRule', {
eventPattern: {
source: ['aws.controltower'],
detail: {
eventName: ['CreateManagedAccount']
}
}
})
const eventDLQ = new sqs.Queue(this, 'eventDLQ');
cTNewAccountRule.addTarget(
new targets.LambdaFunction(
bootStrapperLambda, {
deadLetterQueue: eventDLQ,
maxEventAge: cdk.Duration.hours(2),
retryAttempts: 2
}
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment