Last active
July 9, 2022 01:48
-
-
Save mrpackethead/b4a7806ad29f6535cfac4eeb89de5c34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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