I have some exciting news to share with you about the plugin. Serverless Step Functions One of the main pain points of using the plugin was that you needed to use fully-formed ARNs. We addressed this in by supporting CloudFormation intrinsic functions and . This makes it possible for you to reference a local function instead. v1.18.0 Fn:GetAtt Ref functions: hello-world: handler: hello-world.handler stepFunctions: stateMachines: myStateMachine: definition: StartAt: HelloWorld States: HelloWorld: Type: Task Resource: Fn: :GetAtt: [HelloDashworldLambdaFunction, Arn] End: true But this is still a leaky abstraction - you have to know how the converts local function names into CloudFormation logical IDs. Serverless framework Newcomers would often get confused here. “How did you get the logical ID HelloDashworldLambdaFunction from hello-world?” I can hardly blame them for not knowing. This is an implementation detail in the erverless framework, one that you shouldn’t have to care about! S Which is why I’m really happy to tell you that, as of you can reference local functions using their local names in the state machine definition. v2.2.0 functions: hello-world: handler: hello-world.handler stepFunctions: stateMachines: myStateMachine: definition: StartAt: firstTask States: firstTask: Type: Task Resource: Fn: :GetAtt: [hello-world, Arn] Next: secondTask secondTask: Type: Task Resource: arn:aws:states:::lambda:invoke Parameters: FunctionName: # you can use Ref to get the function name Ref: hello-world Payload: answer: 42 Next: thirdTask thirdTask: Type: Task Resource: arn:aws:states:::lambda:invoke.waitForTaskToken Parameters: FunctionName: # you can also use Fn::GetAtt to get the ARN Fn: :GetAtt: [hello-world, Arn] Payload: token.$: $$.Task.Token End: true In the above example, when we reference the local function we no longer need to use its CloudFormation logical ID . hello-world HelloDashworldLambdaFunction As you can see from the example, it applies when you use either or functions in a state. And it applies to all 3 ways of invoking a Lambda function from a state. Ref Fn::GetAtt Task Task Hi, my name is . I’m an and the author of . I have run production workload at scale in AWS for nearly 10 years and I have been an architect or principal engineer with a variety of industries ranging from banking, e-commerce, sports streaming to mobile gaming. I currently work as an independent consultant focused on AWS and serverless. Yan Cui AWS Serverless Hero Production-Ready Serverless You can contact me via , and . Email Twitter LinkedIn Check out my new course, . Complete Guide to AWS Step Functions In this course, we’ll cover everything you need to know to use AWS Step Functions service effectively. Including basic concepts, HTTP and event triggers, activities, design patterns and best practices. Get your copy . here Come learn about operational for AWS Lambda: CI/CD, testing & debugging functions locally, logging, monitoring, distributed tracing, canary deployments, config management, authentication & authorization, VPC, security, error handling, and more. BEST PRACTICES You can also get off the face price with the code . 40% ytcui Get your copy . here Originally published at https://theburningmonk.com on July 31, 2019.