-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(custom-resources): state machine provider #7979
Conversation
Add a state machine custom resource provider. It uses the nested workflow pattern where the "user" state machine is started as a task in the provider state machine. This allows to set a timeout for the custom resource. This could be used as a base for a Fargate task custom resource provider. Closes aws#6505
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Combined with const stateMachine = new sfn.StateMachine(stack, 'SM', {
definition: new sfn.Task(stack, 'JSON', {
task: new tasks.EvaluateExpression({
expression: 'JSON.parse($.ResourceProperties.Value)',
}),
resultPath: '$.Data',
}),
});
new cdk.CustomResource(stack, 'CR', {
serviceToken: new cr.StateMachineProvider(stack, 'SMP', { stateMachine }).serviceToken,
properties: {
Value: JSON.stringify({ key1: 'value1', key2: 'value2' }),
},
}); A good "LOC to deployed infra" ratio 😄 |
Wow very powerful. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
I am closing this for now. |
Add a state machine custom resource provider.
It uses the nested workflow pattern where the "user" state machine is started
as a task in the provider state machine. This allows to set a timeout for the
custom resource.
This could be used as a base for a Fargate task custom resource provider.
Closes #6505
TODO:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license