aws-step-functions

How to extract part of the string from `$$.Execution.Name` in AWS step function?

不打扰是莪最后的温柔 提交于 2021-02-04 08:28:24
问题 From this page: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html I'm using "TransformJobName.$": "$$.Execution.Name" to define a dynamic SageMaker job name since the name needs to be unique otherwise statemachine will fail When I executed the statemachine, I got the error below: { "resourceType": "sagemaker", "resource": "createTransformJob.sync", "error": "SageMaker.AmazonSageMakerException", "cause": "2 validation errors detected: Value '808bxx-xxxx-xxxx

AWS Batch Job Execution Results in Step Function

给你一囗甜甜゛ 提交于 2021-01-29 09:14:04
问题 I'm newbie to AWS Step Functions and AWS Batch. I'm trying to integrate AWS Batch Job with Step Function. AWS Batch Job executes simple python scripts which output string value (High level simplified requirement) . I need to have the python script output available to the next state of the step function. How I should be able to accomplish this. AWS Batch Job output does not contain results of the python script. instead it contains all the container related information with input values.

How to stop all running Step Functions of a specific state machine?

青春壹個敷衍的年華 提交于 2021-01-29 07:09:23
问题 I accidentally started very many step functions and now wish to terminate all of them. Any smart ways to do this using the CLI or web console? 回答1: OK, let's do this using the CLI. You can stop an execution using the following: aws stepfunctions stop-execution \ --execution-arn <STEP FUNCTION EXECUTION ARN> But since I started way too many executions, it's helpful to be able to list all running executions of a state machine: aws stepfunctions list-executions \ --state-machine-arn <STEP

Is there a way of running AWS Step Functions locally when defined by CDK?

无人久伴 提交于 2021-01-28 05:44:42
问题 AWS Step Functions may be run in a local Docker environment using Step Functions Local Docker. However, the step functions need to be defined using the JSON-based Amazon States Language. This is not at all convenient if your AWS infrastructure (Step Functions plus lambdas) is defined using AWS CDK/CloudFormation. Is there a way to create the Amazon States Language definition of a state machine from the CDK or CloudFormation output, such that it’s possible to run the step functions locally? My

How to append stepfunction execution id to SageMaker job names?

心不动则不痛 提交于 2021-01-20 13:16:09
问题 I have a step function statemachine which creates SageMaker batch transform job, the definition is written in Terraform, I wanted to add the stepfunction execution id to the batch transform job names: in stepfunction terraform file: definition = templatefile("stepfuntion.json", { xxxx ) in the "stepfuntion.json": {... "TransformJobName": "jobname-$$.Execution.Id", } }, "End": true } } } But after terraform apply, it didn't generate the actual id, it gave me jobname-$$.Execution.Id , can

Parallel States Merge the output in Step Function

扶醉桌前 提交于 2020-12-29 06:23:55
问题 Is it possible to have following kind of Step Function graph, i.e. from 2 parallel state output, one combined state: If yes, what would json for this looks like? If not, why? 回答1: It is possible as opposed diagram below The parallel state should look like this "MyParallelState": { "Type": "Parallel", "InputPath": "$", "OutputPath": "$", "ResultPath": "$.ParallelResultPath", "Next": "SetCartCompleteStatusState", "Branches": [ { "StartAt": "UpdateMonthlyUsageState", "States": {

Solutions to fix stuck timers / activities in Cadence/SWF/StepFunctions

♀尐吖头ヾ 提交于 2020-12-13 04:54:34
问题 So timers are durable in workflow engines like Cadence, SWF and Step functions. Durable timer is useful for use cases that need to wait for a long period of time, then wake up to execute some business logic. Because of the durability, it’s resilient to various failures, making the programming experience and model much better for developers. But what if you want to change a timer after it has started? Like this example: @Override public void sampleWorkflowWithTimer(Input input){ //... //some