Step functions: Using Cloudformation substitution yields "Invalid function name or ARN" error
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
I'm using Workflow Studio to work on an asl.json file. When I add a "Lambda: Invoke" action and set the function name to a Cloudformation substitution value, I get an error saying "Invalid function name or ARN". This is incorrect as the function name is properly mapped in my CDK stack.
## Steps to reproduce the issue
1. Create a file called issue.asl.json and paste the following content:
```json
{
"Comment": "Demo state machine",
"StartAt": "Greet",
"States": {
"Greet": {
"Type": "Task",
"Resource": "arn:aws:states:::lambda:invoke",
"QueryLanguage": "JSONata",
"Arguments": {
"FunctionName": "${GREET_LAMBDA_ARN}",
"Payload": "{% $states.input %}"
},
"End": true
}
}
}
```
2. Open the file in Workflow Studio
3. Click on the Save File button
## Expected behavior
The file should save without any errors
## Actual behavior
The "Lambda: Invoke" block turns red and there's a "1 error found" message in the top bar. The error is "Greet (Arguments.FunctionName): Invalid function name or ARN."
## System details (run `AWS: About` and/or `Amazon Q: About`)
- OS: macOS 15.5 (24F74) (arm64)
- Visual Studio Code version: 1.99.3
- AWS Toolkit version: 3.71.0
- Amazon Q version: N/A
Contributor guide
Research direction
Start by reproducing the issue with issue.asl.json in Workflow Studio and inspect the validation applied when saving a Lambda: Invoke action with a CloudFormation substitution in Arguments.FunctionName. Trace the validator or entry point that reports “Invalid function name or ARN,” then verify that the file saves without errors while preserving validation for invalid values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- cloud, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100