-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(target): Fix step function target policy
- Loading branch information
1 parent
43cbb8f
commit e99d193
Showing
6 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { App, Stack } from 'aws-cdk-lib'; | ||
import { LogGroup } from 'aws-cdk-lib/aws-logs'; | ||
import { Queue } from 'aws-cdk-lib/aws-sqs'; | ||
import { Pass, StateMachine, StateMachineType, LogLevel } from 'aws-cdk-lib/aws-stepfunctions'; | ||
import { Pipe, SqsSource, StepFunctionTarget } from '../../../src'; | ||
|
||
const app = new App(); | ||
const stack = new Stack(app, 'E2EPipesSqsStepFunction', {}); | ||
|
||
const sourceQueue = new Queue(stack, 'SourceQueue'); | ||
const source = new SqsSource(sourceQueue); | ||
const sfnDefinition = new Pass(stack, 'Pass'); | ||
const sfnLoggroup = new LogGroup(stack, 'SfnLogGroup'); | ||
|
||
const stateMachine = new StateMachine(stack, 'QueueHandlerStateMachine', { | ||
definition: sfnDefinition, | ||
stateMachineType: StateMachineType.EXPRESS, | ||
logs: { | ||
destination: sfnLoggroup, | ||
level: LogLevel.ALL, | ||
includeExecutionData: true, | ||
}, | ||
}); | ||
|
||
const target = new StepFunctionTarget(stateMachine); | ||
new Pipe(stack, 'Pipe', { | ||
source, | ||
target, | ||
}); | ||
|
||
// DEBUG: add a rule to the event bus to see what messages are being sent |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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