Add support for Fn::GetAtt in the Step Function Resource Attributes
See original GitHub issueCurrently, step functions can be written using the new functionality in AWS toolkit, which is quite helpful. One thing I do, is handle all deployment using serverless. For that, I parameterize my resources using the Fn::GetAtt instead of hardcoding the name of the lambda function in the JSON definition.
For example, the following state will be okay with serverless framework, but the rendering does not accept it:
"Downloader":{
"Type": "Task",
"Resource": {"Fn::GetAtt": ["download-handler", "Arn"]},
"Catch": [
{
"ErrorEquals": [
"Runtime.ExitError"
],
"Next": "RedefineParameters"
},
{
"ErrorEquals": [
"Task.Failed"
],
"Next": "HandleFailure"
}
],
"Retry": [ {
"ErrorEquals": ["Lambda.ServiceException", "Lambda.AWSLambdaException", "Lambda.SdkClientException", "Lambda.TooManyRequestsException"],
"IntervalSeconds": 5,
"MaxAttempts": 10,
"BackoffRate": 2
} ],
"ResultPath": "$.results",
"Next": "IsCommpleted"
}
Describe the solution you’d like I would like this to not be flagged as a faulty JSON definition and the rendering to work
Describe alternatives you’ve considered
I have been manually removing all my parameterized resource names with empty "". But this can be tedious and error prone as your state machine grows in size
Additional context Serverless will accept the JSON as write above, which is great. But the rendering of the state machine is not working which causes problems with dev speed
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (5 by maintainers)

Top Related StackOverflow Question
Just wanted to throw my hat into the ring here, in support of this change/fix. I understand
"Resource": {"Fn::GetAtt": ["download-handler", "Arn"]}is not valid as far as a raw state definition. But if the purpose is to help us visualize the step function before deploying it, and many people are using SAM or Serverless Framework, it would make sense to allowResourceto be an object.It’s a bit tedious to go through and temporarily replace the resources with strings.
@bryceitoc9 I noticed this was closed with no details given. Is this a
wontfix? What’s the status of this?