@aws-cdk/aws-stepfunctions
Advanced tools
Comparing version 0.12.0 to 0.13.0
@@ -0,1 +1,17 @@ | ||
export * from './activity'; | ||
export * from './types'; | ||
export * from './condition'; | ||
export * from './state-machine'; | ||
export * from './state-machine-fragment'; | ||
export * from './state-transition-metrics'; | ||
export * from './chain'; | ||
export * from './state-graph'; | ||
export * from './states/choice'; | ||
export * from './states/fail'; | ||
export * from './states/parallel'; | ||
export * from './states/pass'; | ||
export * from './states/state'; | ||
export * from './states/succeed'; | ||
export * from './states/task'; | ||
export * from './states/wait'; | ||
export * from './stepfunctions.generated'; |
@@ -6,4 +6,20 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./activity")); | ||
__export(require("./types")); | ||
__export(require("./condition")); | ||
__export(require("./state-machine")); | ||
__export(require("./state-machine-fragment")); | ||
__export(require("./state-transition-metrics")); | ||
__export(require("./chain")); | ||
__export(require("./state-graph")); | ||
__export(require("./states/choice")); | ||
__export(require("./states/fail")); | ||
__export(require("./states/parallel")); | ||
__export(require("./states/pass")); | ||
__export(require("./states/state")); | ||
__export(require("./states/succeed")); | ||
__export(require("./states/task")); | ||
__export(require("./states/wait")); | ||
// AWS::StepFunctions CloudFormation Resources: | ||
__export(require("./stepfunctions.generated")); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLCtDQUErQztBQUMvQywrQ0FBMEMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBBV1M6OlN0ZXBGdW5jdGlvbnMgQ2xvdWRGb3JtYXRpb24gUmVzb3VyY2VzOlxuZXhwb3J0ICogZnJvbSAnLi9zdGVwZnVuY3Rpb25zLmdlbmVyYXRlZCc7XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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lcy9zdWNjZWVkJztcbmV4cG9ydCAqIGZyb20gJy4vc3RhdGVzL3Rhc2snO1xuZXhwb3J0ICogZnJvbSAnLi9zdGF0ZXMvd2FpdCc7XG5cbi8vIEFXUzo6U3RlcEZ1bmN0aW9ucyBDbG91ZEZvcm1hdGlvbiBSZXNvdXJjZXM6XG5leHBvcnQgKiBmcm9tICcuL3N0ZXBmdW5jdGlvbnMuZ2VuZXJhdGVkJztcbiJdfQ== |
@@ -5,3 +5,3 @@ "use strict"; | ||
// See: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html | ||
// @cfn2ts:meta@ {"generated":"2018-10-12T09:43:03.444Z","fingerprint":"Z4mxTWWMfBvZKSqcg+G9GMDBvDvcS1bAfSkoYd35CS4="} | ||
// @cfn2ts:meta@ {"generated":"2018-10-19T13:46:27.080Z","fingerprint":"Z4mxTWWMfBvZKSqcg+G9GMDBvDvcS1bAfSkoYd35CS4="} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -143,2 +143,2 @@ // tslint:disable:max-line-length | This is generated code - line lengths are difficult to control | ||
})(cloudformation = exports.cloudformation || (exports.cloudformation = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RlcGZ1bmN0aW9ucy5nZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzdGVwZnVuY3Rpb25zLmdlbmVyYXRlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0VBQStFO0FBQy9FLCtEQUErRDtBQUMvRCw4RkFBOEY7QUFDOUYsc0hBQXNIOztBQUV0SCxrR0FBa0c7QUFFbEcsb0NBQXFDO0FBRXJDLElBQWlCLGNBQWMsQ0E4RTlCO0FBOUVELFdBQWlCLGNBQWM7SUFZM0I7Ozs7OztPQU1HO0lBQ0gsU0FBUyw4QkFBOEIsQ0FBQyxVQUFlO1FBQ25ELElBQUksQ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CBwcm9wZXJ0aWVzIH0pO1xuICAgICAgICAgICAgY2RrLnJlcXVpcmVQcm9wZXJ0eShwcm9wZXJ0aWVzLCAnZGVmaW5pdGlvblN0cmluZycsIHRoaXMpO1xuICAgICAgICAgICAgY2RrLnJlcXVpcmVQcm9wZXJ0eShwcm9wZXJ0aWVzLCAncm9sZUFybicsIHRoaXMpO1xuICAgICAgICAgICAgdGhpcy5zdGF0ZU1hY2hpbmVOYW1lID0gdGhpcy5nZXRBdHQoJ05hbWUnKS50b1N0cmluZygpO1xuICAgICAgICAgICAgdGhpcy5zdGF0ZU1hY2hpbmVBcm4gPSB0aGlzLnJlZi50b1N0cmluZygpO1xuICAgICAgICB9XG5cbiAgICAgICAgcHVibGljIGdldCBwcm9wZXJ0eU92ZXJyaWRlcygpOiBTdGF0ZU1hY2hpbmVSZXNvdXJjZVByb3BzIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnVudHlwZWRQcm9wZXJ0eU92ZXJyaWRlcztcbiAgICAgICAgfVxuICAgICAgICBwcm90ZWN0ZWQgcmVuZGVyUHJvcGVydGllcyhwcm9wZXJ0aWVzOiBhbnkpOiB7IFtrZXk6IHN0cmluZ106IGFueSB9ICB7XG4gICAgICAgICAgICByZXR1cm4gc3RhdGVNYWNoaW5lUmVzb3VyY2VQcm9wc1RvQ2xvdWRGb3JtYXRpb24oY2RrLnJlc29sdmUocHJvcGVydGllcykpO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19 |
{ | ||
"name": "@aws-cdk/aws-stepfunctions", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "The CDK Construct Library for AWS::StepFunctions", | ||
@@ -55,11 +55,15 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@aws-cdk/assert": "^0.12.0", | ||
"cdk-build-tools": "^0.12.0", | ||
"cfn2ts": "^0.12.0", | ||
"pkglint": "^0.12.0" | ||
"@aws-cdk/assert": "^0.13.0", | ||
"cdk-build-tools": "^0.13.0", | ||
"cdk-integ-tools": "^0.13.0", | ||
"cfn2ts": "^0.13.0", | ||
"pkglint": "^0.13.0" | ||
}, | ||
"dependencies": { | ||
"@aws-cdk/cdk": "^0.12.0" | ||
"@aws-cdk/aws-cloudwatch": "^0.13.0", | ||
"@aws-cdk/aws-events": "^0.13.0", | ||
"@aws-cdk/aws-iam": "^0.13.0", | ||
"@aws-cdk/cdk": "^0.13.0" | ||
}, | ||
"homepage": "https://github.com/awslabs/aws-cdk" | ||
} |
376
README.md
@@ -1,2 +0,374 @@ | ||
## The CDK Construct Library for AWS Step Functions | ||
This module is part of the [AWS Cloud Development Kit](https://github.com/awslabs/aws-cdk) project. | ||
## AWS Step Functions Construct Library | ||
The `@aws-cdk/aws-stepfunctions` package contains constructs for building | ||
serverless workflows. Using objects. Defining a workflow looks like this | ||
(for the [Step Functions Job Poller | ||
example](https://docs.aws.amazon.com/step-functions/latest/dg/job-status-poller-sample.html)): | ||
```ts | ||
const submitLambda = new lambda.Function(this, 'SubmitLambda', { ... }); | ||
const getStatusLambda = new lambda.Function(this, 'CheckLambda', { ... }); | ||
const submitJob = new stepfunctions.Task(this, 'Submit Job', { | ||
resource: submitLambda, | ||
// Put Lambda's result here in the execution's state object | ||
resultPath: '$.guid', | ||
}); | ||
const waitX = new stepfunctions.Wait(this, 'Wait X Seconds', { secondsPath: '$.wait_time' }); | ||
const getStatus = new stepfunctions.Task(this, 'Get Job Status', { | ||
resource: getStatusLambda, | ||
// Pass just the field named "guid" into the Lambda, put the | ||
// Lambda's result in a field called "status" | ||
inputPath: '$.guid', | ||
resultPath: '$.status', | ||
}); | ||
const jobFailed = new stepfunctions.Fail(this, 'Job Failed', { | ||
cause: 'AWS Batch Job Failed', | ||
error: 'DescribeJob returned FAILED', | ||
}); | ||
const finalStatus = new stepfunctions.Task(this, 'Get Final Job Status', { | ||
resource: getStatusLambda, | ||
// Use "guid" field as input, output of the Lambda becomes the | ||
// entire state machine output. | ||
inputPath: '$.guid', | ||
}); | ||
const definition = submitJob | ||
.next(waitX) | ||
.next(getStatus) | ||
.next(new stepfunctions.Choice(this, 'Job Complete?') | ||
// Look at the "status" field | ||
.when(stepfunctions.Condition.stringEquals('$.status', 'FAILED'), jobFailed) | ||
.when(stepfunctions.Condition.stringEquals('$.status', 'SUCCEEDED'), finalStatus) | ||
.otherwise(waitX)); | ||
new stepfunctions.StateMachine(this, 'StateMachine', { | ||
definition, | ||
timeoutSec: 300 | ||
}); | ||
``` | ||
## State Machine | ||
A `stepfunctions.StateMachine` is a resource that takes a state machine | ||
definition. The definition is specified by its start state, and encompasses | ||
all states reachable from the start state: | ||
```ts | ||
const startState = new stepfunctions.Pass(this, 'StartState'); | ||
new stepfunctions.StateMachine(this, 'StateMachine', { | ||
definition: startState | ||
}); | ||
``` | ||
State machines execute using an IAM Role, which will automatically have all | ||
permissions added that are required to make all state machine tasks execute | ||
properly (for example, permissions to invoke any Lambda functions you add to | ||
your workflow). A role will be created by default, but you can supply an | ||
existing one as well. | ||
## Amazon States Language | ||
This library comes with a set of classes that model the [Amazon States | ||
Language](https://states-language.net/spec.html). The following State classes | ||
are supported: | ||
* `Task` | ||
* `Pass` | ||
* `Wait` | ||
* `Choice` | ||
* `Parallel` | ||
* `Succeed` | ||
* `Fail` | ||
An arbitrary JSON object (specified at execution start) is passed from state to | ||
state and transformed during the execution of the workflow. For more | ||
information, see the States Language spec. | ||
### Task | ||
A `Task` represents some work that needs to be done. It takes a `resource` | ||
property that is either a Lambda `Function` or a Step Functions `Activity` | ||
(A Lambda Function runs your task's code on AWS Lambda, whereas an `Activity` | ||
is used to run your task's code on an arbitrary compute fleet you manage). | ||
```ts | ||
const task = new stepfunctions.Task(this, 'Invoke The Lambda', { | ||
resource: myLambda, | ||
inputPath: '$.input', | ||
timeoutSeconds: 300, | ||
}); | ||
// Add a retry policy | ||
task.addRetry({ | ||
intervalSeconds: 5, | ||
maxAttempts: 10 | ||
}); | ||
// Add an error handler | ||
task.addCatch(errorHandlerState); | ||
// Set the next state | ||
task.next(nextState); | ||
``` | ||
### Pass | ||
A `Pass` state does no work, but it can optionally transform the execution's | ||
JSON state. | ||
```ts | ||
// Makes the current JSON state { ..., "subObject": { "hello": "world" } } | ||
const pass = new stepfunctions.Pass(this, 'Add Hello World', { | ||
result: { hello: "world" }, | ||
resultPath: '$.subObject', | ||
}); | ||
// Set the next state | ||
pass.next(nextState); | ||
``` | ||
### Wait | ||
A `Wait` state waits for a given number of seconds, or until the current time | ||
hits a particular time. The time to wait may be taken from the execution's JSON | ||
state. | ||
```ts | ||
// Wait until it's the time mentioned in the the state object's "triggerTime" | ||
// field. | ||
const wait = new stepfunctions.Wait(this, 'Wait For Trigger Time', { | ||
timestampPath: '$.triggerTime', | ||
}); | ||
// Set the next state | ||
wait.next(startTheWork); | ||
``` | ||
### Choice | ||
A `Choice` state can take a differen path through the workflow based on the | ||
values in the execution's JSON state: | ||
```ts | ||
const choice = new stepfunctions.Choice(this, 'Did it work?'); | ||
// Add conditions with .when() | ||
choice.when(stepfunctions.Condition.stringEqual('$.status', 'SUCCESS'), successState); | ||
choice.when(stepfunctions.Condition.numberGreaterThan('$.attempts', 5), failureState); | ||
// Use .otherwise() to indicate what should be done if none of the conditions match | ||
choice.otherwise(tryAgainState); | ||
``` | ||
If you want to temporarily branch your workflow based on a condition, but have | ||
all branches come together and continuing as one (similar to how an `if ... | ||
then ... else` works in a programming language), use the `.afterwards()` method: | ||
```ts | ||
const choice = new stepfunctions.Choice(this, 'What color is it?'); | ||
choice.when(stepfunctions.Condition.stringEqual('$.color', 'BLUE'), handleBlueItem); | ||
choice.when(stepfunctions.Condition.stringEqual('$.color', 'RED'), handleRedItem); | ||
choice.otherwise(handleOtherItemColor); | ||
// Use .afterwards() to join all possible paths back together and continue | ||
choice.afterwards().next(shipTheItem); | ||
``` | ||
If your `Choice` doesn't have an `otherwise()` and none of the conditions match | ||
the JSON state, a `NoChoiceMatched` error will be thrown. Wrap the state machine | ||
in a `Parallel` state if you want to catch and recover from this. | ||
### Parallel | ||
A `Parallel` state executes one or more subworkflows in parallel. It can also | ||
be used to catch and recover from errors in subworkflows. | ||
```ts | ||
const parallel = new stepfunctions.Parallel(this, 'Do the work in parallel'); | ||
// Add branches to be executed in parallel | ||
parallel.branch(shipItem); | ||
parallel.branch(sendInvoice); | ||
parallel.branch(restock); | ||
// Retry the whole workflow if something goes wrong | ||
parallel.addRetry({ maxAttempts: 1 }); | ||
// How to recover from errors | ||
parallel.addCatch(sendFailureNotification); | ||
// What to do in case everything succeeded | ||
parallel.next(closeOrder); | ||
``` | ||
### Succeed | ||
Reaching a `Succeed` state terminates the state machine execution with a | ||
succesful status. | ||
```ts | ||
const success = new stepfunctions.Succeed(this, 'We did it!'); | ||
``` | ||
### Fail | ||
Reaching a `Fail` state terminates the state machine execution with a | ||
failure status. The fail state should report the reason for the failure. | ||
Failures can be caught by encompassing `Parallel` states. | ||
```ts | ||
const success = new stepfunctions.Fail(this, 'Fail', { | ||
error: 'WorkflowFailure', | ||
cause: "Something went wrong" | ||
}); | ||
``` | ||
## Task Chaining | ||
To make defining work flows as convenient (and readable in a top-to-bottom way) | ||
as writing regular programs, it is possible to chain most methods invocations. | ||
In particular, the `.next()` method can be repeated. The result of a series of | ||
`.next()` calls is called a **Chain**, and can be used when defining the jump | ||
targets of `Choice.on` or `Parallel.branch`: | ||
```ts | ||
const definition = step1 | ||
.next(step2) | ||
.next(choice | ||
.when(condition1, step3.next(step4).next(step5)) | ||
.otherwise(step6) | ||
.afterwards()) | ||
.next(parallel | ||
.branch(step7.next(step8)) | ||
.branch(step9.next(step10))) | ||
.next(finish); | ||
new stepfunctions.StateMachine(this, 'StateMachine', { | ||
definition, | ||
}); | ||
``` | ||
If you don't like the visual look of starting a chain directly off the first | ||
step, you can use `Chain.start`: | ||
```ts | ||
const definition = stepfunctions.Chain | ||
.start(step1) | ||
.next(step2) | ||
.next(step3) | ||
// ... | ||
``` | ||
## State Machine Fragments | ||
It is possible to define reusable (or abstracted) mini-state machines by | ||
defining a construct that implements `IChainable`, which requires you to define | ||
two fields: | ||
* `startState: State`, representing the entry point into this state machine. | ||
* `endStates: INextable[]`, representing the (one or more) states that outgoing | ||
transitions will be added to if you chain onto the fragment. | ||
Since states will be named after their construct IDs, you may need to prefix the | ||
IDs of states if you plan to instantiate the same state machine fragment | ||
multiples times (otherwise all states in every instantiation would have the same | ||
name). | ||
The class `StateMachineFragment` contains some helper functions (like | ||
`prefixStates()`) to make it easier for you to do this. If you define your state | ||
machine as a subclass of this, it will be convenient to use: | ||
```ts | ||
interface MyJobProps { | ||
jobFlavor: string; | ||
} | ||
class MyJob extends stepfunctions.StateMachineFragment { | ||
public readonly startState: State; | ||
public readonly endStates: INextable[]; | ||
constructor(parent: cdk.Construct, id: string, props: MyJobProps) { | ||
super(parent, id); | ||
const first = new stepfunctions.Task(this, 'First', { ... }); | ||
// ... | ||
const last = new stepfunctions.Task(this, 'Last', { ... }); | ||
this.startState = first; | ||
this.endStates = [last]; | ||
} | ||
} | ||
// Do 3 different variants of MyJob in parallel | ||
new stepfunctions.Parallel(this, 'All jobs') | ||
.branch(new MyJob(this, 'Quick', { jobFlavor: 'quick' }).prefixStates()) | ||
.branch(new MyJob(this, 'Medium', { jobFlavor: 'medium' }).prefixStates()) | ||
.branch(new MyJob(this, 'Slow', { jobFlavor: 'slow' }).prefixStates()); | ||
``` | ||
## Activity | ||
**Activities** represent work that is done on some non-Lambda worker pool. The | ||
Step Functions workflow will submit work to this Activity, and a worker pool | ||
that you run yourself, probably on EC2, will pull jobs from the Activity and | ||
submit the results of individual jobs back. | ||
You need the ARN to do so, so if you use Activities be sure to pass the Activity | ||
ARN into your worker pool: | ||
```ts | ||
const activity = new stepfunctions.Activity(this, 'Activity'); | ||
// Read this Output from your application and use it to poll for work on | ||
// the activity. | ||
new cdk.Output(this, 'ActivityArn', { value: activity.activityArn }); | ||
``` | ||
## Metrics | ||
`Task` object expose various metrics on the execution of that particular task. For example, | ||
to create an alarm on a particular task failing: | ||
```ts | ||
new cloudwatch.Alarm(this, 'TaskAlarm', { | ||
metric: task.metricFailed(), | ||
threshold: 1, | ||
evaluationPeriods: 1, | ||
}); | ||
``` | ||
There are also metrics on the complete state machine: | ||
```ts | ||
new cloudwatch.Alarm(this, 'StateMachineAlarm', { | ||
metric: stateMachine.metricFailed(), | ||
threshold: 1, | ||
evaluationPeriods: 1, | ||
}); | ||
``` | ||
And there are metrics on the capacity of all state machines in your account: | ||
```ts | ||
new cloudwatch.Alarm(this, 'ThrottledAlarm', { | ||
metric: StateTransitionMetrics.metricThrottledEvents(), | ||
threshold: 10, | ||
evaluationPeriods: 2, | ||
}); | ||
``` | ||
## Future work | ||
Contributions welcome: | ||
- [ ] A single `LambdaTask` class that is both a `Lambda` and a `Task` in one | ||
might make for a nice API. | ||
- [ ] Expression parser for Conditions. | ||
- [ ] Simulate state machines in unit tests. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
566996
56
4253
375
4
5
1
+ Added@aws-cdk/aws-events@^0.13.0
+ Added@aws-cdk/aws-iam@^0.13.0
+ Added@aws-cdk/aws-cloudwatch@0.13.0(transitive)
+ Added@aws-cdk/aws-events@0.13.0(transitive)
+ Added@aws-cdk/aws-iam@0.13.0(transitive)
+ Added@aws-cdk/cdk@0.13.0(transitive)
+ Added@aws-cdk/cx-api@0.13.0(transitive)
- Removed@aws-cdk/cdk@0.12.0(transitive)
- Removed@aws-cdk/cx-api@0.12.0(transitive)
Updated@aws-cdk/cdk@^0.13.0