Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(events): DLQ and retry policy support for BatchJob target (#15308)
Add DLQ and Retry policy Configuration to BatchJob targets. Using a DLQ on a rule prevents the application to loose events after all retry attempts are exhausted. Update README.md and code examples to support Rosetta translation and compiling. Resolves #15238 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
13 changed files
with
486 additions
and
107 deletions.
There are no files selected for viewing
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
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
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
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
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
23 changes: 23 additions & 0 deletions
23
packages/@aws-cdk/aws-events-targets/lib/withRepoAndKinesisStream.ts-fixture
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Fixture with packages imported, but nothing else | ||
import { Duration, RemovalPolicy, Stack } from '@aws-cdk/core'; | ||
import { Construct } from 'constructs'; | ||
|
||
import * as targets from '@aws-cdk/aws-events-targets'; | ||
import * as events from '@aws-cdk/aws-events'; | ||
import * as kinesis from '@aws-cdk/aws-kinesis'; | ||
import * as codecommit from '@aws-cdk/aws-codecommit'; | ||
import * as cdk from '@aws-cdk/core'; | ||
|
||
class Fixture extends Stack { | ||
constructor(scope: Construct, id: string) { | ||
super(scope, id); | ||
|
||
const repository = new codecommit.Repository(this, 'MyRepo', { | ||
repositoryName: 'aws-cdk-events', | ||
}); | ||
|
||
const stream = new kinesis.Stream(stack, 'MyStream'); | ||
|
||
/// here | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/@aws-cdk/aws-events-targets/rosetta/default.ts-fixture
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Fixture with packages imported, but nothing else | ||
import { Duration, RemovalPolicy, Stack } from '@aws-cdk/core'; | ||
import { Construct } from 'constructs'; | ||
|
||
import * as targets from '@aws-cdk/aws-events-targets'; | ||
import * as events from '@aws-cdk/aws-events'; | ||
import * as sqs from '@aws-cdk/aws-sqs'; | ||
import * as cdk from '@aws-cdk/core'; | ||
|
||
class Fixture extends Stack { | ||
constructor(scope: Construct, id: string) { | ||
super(scope, id); | ||
|
||
/// here | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/@aws-cdk/aws-events-targets/rosetta/withRepoAndKinesisStream.ts-fixture
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Fixture with packages imported, but nothing else | ||
import { Duration, RemovalPolicy, Stack } from '@aws-cdk/core'; | ||
import { Construct } from 'constructs'; | ||
|
||
import * as targets from '@aws-cdk/aws-events-targets'; | ||
import * as events from '@aws-cdk/aws-events'; | ||
import * as kinesis from '@aws-cdk/aws-kinesis'; | ||
import * as codecommit from '@aws-cdk/aws-codecommit'; | ||
import * as cdk from '@aws-cdk/core'; | ||
|
||
class Fixture extends Stack { | ||
constructor(scope: Construct, id: string) { | ||
super(scope, id); | ||
|
||
const repository = new codecommit.Repository(this, 'MyRepo', { | ||
repositoryName: 'aws-cdk-events', | ||
}); | ||
|
||
const stream = new kinesis.Stream(this, 'MyStream'); | ||
|
||
/// here | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/@aws-cdk/aws-events-targets/rosetta/withRepoAndSqsQueue.ts-fixture
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Fixture with packages imported, but nothing else | ||
import { Duration, RemovalPolicy, Stack } from '@aws-cdk/core'; | ||
import { Construct } from 'constructs'; | ||
|
||
import * as targets from '@aws-cdk/aws-events-targets'; | ||
import * as events from '@aws-cdk/aws-events'; | ||
import * as sqs from '@aws-cdk/aws-sqs'; | ||
import * as codecommit from '@aws-cdk/aws-codecommit'; | ||
import * as cdk from '@aws-cdk/core'; | ||
|
||
class Fixture extends Stack { | ||
constructor(scope: Construct, id: string) { | ||
super(scope, id); | ||
|
||
const repository = new codecommit.Repository(this, 'MyRepo', { | ||
repositoryName: 'aws-cdk-events', | ||
}); | ||
|
||
const queue = new sqs.Queue(this, 'MyQueue'); | ||
|
||
/// here | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/@aws-cdk/aws-events-targets/rosetta/withRepoAndTopic.ts-fixture
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Fixture with packages imported, but nothing else | ||
import { Duration, RemovalPolicy, Stack } from '@aws-cdk/core'; | ||
import { Construct } from 'constructs'; | ||
|
||
import * as targets from '@aws-cdk/aws-events-targets'; | ||
import * as events from '@aws-cdk/aws-events'; | ||
import * as sns from '@aws-cdk/aws-sns'; | ||
import * as codecommit from '@aws-cdk/aws-codecommit'; | ||
import * as cdk from '@aws-cdk/core'; | ||
|
||
class Fixture extends Stack { | ||
constructor(scope: Construct, id: string) { | ||
super(scope, id); | ||
|
||
const repository = new codecommit.Repository(this, 'MyRepo', { | ||
repositoryName: 'aws-cdk-events', | ||
}); | ||
|
||
const topic = new sns.Topic(this, 'MyTopic'); | ||
|
||
/// here | ||
} | ||
} |
Oops, something went wrong.