(stepfunctions): state machine name validation fails when tokens are used in name #14923
Labels
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
A bug was introduced in 1.93.0 that causes code to break using cdk creating step function with cf parameter value used in step function name.
#13289
6c3d407
58de0de
Reproduction Steps
What did you expect to happen?
Step function is created as it was in v1.92.0
What actually happened?
Traceback (most recent call last):
File "app.py", line 61, in
env=environ)
File "/usr/local/share/pip-global/jsii/_runtime.py", line 83, in call
inst = super().call(*args, **kwargs)
File "/workspaces/ml-factory-aws/stacks/cdk_pipeline_stack.py", line 95, in init
deployment_id='test', env=preprod_env)
File "/usr/local/share/pip-global/jsii/_runtime.py", line 83, in call
inst = super().call(*args, **kwargs)
File "/workspaces/ml-factory-aws/stacks/cdk_pipeline_stage_stack.py", line 51, in init
env=account_env)
File "/usr/local/share/pip-global/jsii/_runtime.py", line 83, in call
inst = super().call(*args, **kwargs)
File "/workspaces/ml-factory-aws/stacks/s3_resource_stack.py", line 42, in init
env=account_env)
File "/usr/local/share/pip-global/jsii/_runtime.py", line 83, in call
inst = super().call(*args, **kwargs)
File "/workspaces/ml-factory-aws/stacks/ds_sc_product_stack.py", line 77, in init
suffix='inference', project_id=project_id)
File "/workspaces/ml-factory-aws/stacks/ds_sc_product_stack.py", line 1199, in create_step_functions
state_machine_name=f'ml-factory-sf-{suffix}-{project_id.value_as_string}-sandbox',
File "/usr/local/share/pip-global/jsii/_runtime.py", line 83, in call
inst = super().call(*args, **kwargs)
File "/usr/local/share/pip-global/aws_cdk/aws_stepfunctions/init.py", line 5100, in init
jsii.create(StateMachine, self, [scope, id, props])
File "/usr/local/share/pip-global/jsii/_kernel/init.py", line 282, in create
for iface in getattr(klass, "jsii_ifaces", [])
File "/usr/local/share/pip-global/jsii/_kernel/providers/process.py", line 344, in create
return self._process.send(request, CreateResponse)
File "/usr/local/share/pip-global/jsii/kernel/providers/process.py", line 326, in send
raise JSIIError(resp.error) from JavaScriptError(resp.stack)
jsii.errors.JSIIError: State Machine name must match "^[0-9a-zA-Z+!@.-]+$". Received: ml-factory-sf-inference-${Token[TOKEN.327]}-sandbox
Environment
Other
https://stackoverflow.com/questions/67769103/how-do-i-use-cloudformation-parameter-in-a-stepfunction-name
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: