aws-step-functions

Sagemaker processing job with PySpark and Step Functions

南笙酒味 提交于 2021-02-11 15:02:27
问题 this is my problem: I have to run a Sagemaker processing job using custom code written in PySpark. I've used the Sagemaker SDK by running these commands: spark_processor = sagemaker.spark.processing.PySparkProcessor( base_job_name="spark-preprocessor", framework_version="2.4", role=role_arn, instance_count=2, instance_type="ml.m5.xlarge", max_runtime_in_seconds=1800, ) spark_processor.run( submit_app="processing.py", arguments=['s3_input_bucket', bucket_name, 's3_input_file_path', file_path ]

What is “hellostepfunc1” in the serverless documenation for setup AWS stepfunctions?

China☆狼群 提交于 2021-02-11 15:00:26
问题 In these documentation from the serverless website - How to manage your AWS Step Functions with Serverless and GiTHUb - serverless-step-functions, we can find this word hellostepfunc1: in the serverless.yml file. I could not find reference to it. I dont understand what is it, and I can't find any reference to it, even after the State Machine was created into AWS. If I delete it I get the follow error Cannot use 'in' operator to search for 'role' in myStateMachine But if I change its name for

What is “hellostepfunc1” in the serverless documenation for setup AWS stepfunctions?

安稳与你 提交于 2021-02-11 14:59:01
问题 In these documentation from the serverless website - How to manage your AWS Step Functions with Serverless and GiTHUb - serverless-step-functions, we can find this word hellostepfunc1: in the serverless.yml file. I could not find reference to it. I dont understand what is it, and I can't find any reference to it, even after the State Machine was created into AWS. If I delete it I get the follow error Cannot use 'in' operator to search for 'role' in myStateMachine But if I change its name for

How to enable CloudWatch logging and X-ray for stepfunction in Terraform?

微笑、不失礼 提交于 2021-02-11 14:13:57
问题 In AWS console, we can easily enable cloudwatch logging and X-ray for a step function statemachine, but I want my resource fully managed by Terraform, from this page:https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sfn_state_machine It seems like Terraform doesn't support this at the moment (also see: https://github.com/hashicorp/terraform-provider-aws/issues/12192) Does anyone know if there is any workaround to achieve this? I'd really like to be able to enable

How to parse stepfunction executionId to SageMaker batch transform job name?

霸气de小男生 提交于 2021-02-11 12:29:35
问题 I have created a stepfunction, the definition for this statemachine below ( step-function.json ) is used in terraform (using the syntax in this page:https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html) The first time if I execute this statemachine, it will create a SageMaker batch transform job named example-jobname , but I need to exeucute this statemachine everyday, then it will give me error "error": "SageMaker.ResourceInUseException", "cause": "Job name

Json parsing error when running 'aws stepfunctions update-state-machine' via Terraform

杀马特。学长 韩版系。学妹 提交于 2021-02-11 12:24:54
问题 I'm following the answer in this question, I tried to enable x-ray and it works, code I used: resource "null_resource" "enable_step_function_logging" { triggers = { state_machine_arn = aws_sfn_state_machine.sfn_state_machine.arn } provisioner "local-exec" { command = "aws stepfunctions update-state-machine --state-machine-arn ${self.triggers.state_machine_arn} --tracing-configuration enabled=true" } } Now I want to enable cloudwatch logging ' --logging-configuration=xxx' part, but I keep

Executing Step Function “Tasks” using ECS Fargate

北战南征 提交于 2021-02-08 15:14:37
问题 In Re:Invent 2018, AWS seems to have launched new integrations with Step Functions, which includes ECS Fargate support. https://docs.aws.amazon.com/step-functions/latest/dg/connectors-ecs.html I have been digging up on this, and I am able to get the ECS task to startup, and do its thing, but I am not able to send desired output back to the step function. The response syntax too does not seem to have anything that corresponds to the output of a particular state. https://docs.aws.amazon.com

Executing Step Function “Tasks” using ECS Fargate

有些话、适合烂在心里 提交于 2021-02-08 15:13:48
问题 In Re:Invent 2018, AWS seems to have launched new integrations with Step Functions, which includes ECS Fargate support. https://docs.aws.amazon.com/step-functions/latest/dg/connectors-ecs.html I have been digging up on this, and I am able to get the ECS task to startup, and do its thing, but I am not able to send desired output back to the step function. The response syntax too does not seem to have anything that corresponds to the output of a particular state. https://docs.aws.amazon.com

AWS Step Function: Function .length() returned error in variable field in Choice state

萝らか妹 提交于 2021-02-06 21:36:21
问题 I have a Choice state in AWS Step Function that would compare an array's length from Input and make decision to go next state. However, the length() function, to get the array's length, returned an error: { "error": "States.Runtime", "cause": "An error occurred while executing the state 'CheckItemsCountState' (entered at the event id #18). Invalid path '$.Metadata[2].Items.length()': The choice state's condition path references an invalid value." } The Choice state's definition is as below:

AWS Step Function: Function .length() returned error in variable field in Choice state

坚强是说给别人听的谎言 提交于 2021-02-06 21:34:05
问题 I have a Choice state in AWS Step Function that would compare an array's length from Input and make decision to go next state. However, the length() function, to get the array's length, returned an error: { "error": "States.Runtime", "cause": "An error occurred while executing the state 'CheckItemsCountState' (entered at the event id #18). Invalid path '$.Metadata[2].Items.length()': The choice state's condition path references an invalid value." } The Choice state's definition is as below: