{"library":"serverless-step-functions","title":"Serverless Step Functions Plugin","description":"The `serverless-step-functions` plugin provides deep integration for AWS Step Functions within the Serverless Framework. It allows developers to define, deploy, and manage complex serverless workflows directly within their `serverless.yml` configuration. As of version `3.29.1`, the project maintains a rapid release cadence, frequently pushing out new features and bug fixes, often several times per month. Key differentiators include automatic IAM role generation tailored to state machine definitions, comprehensive event source integrations (such as API Gateway, Scheduled events, and CloudWatch Events), support for advanced features like Blue-Green deployments, pre-deployment validation, CloudWatch Alarms, and X-Ray tracing. It significantly streamlines the orchestration of AWS services by abstracting away much of the underlying CloudFormation complexity required for Step Functions.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install serverless-step-functions"],"cli":null},"imports":["plugins:\n  - serverless-step-functions","stepFunctions:\n  stateMachines:\n    myStateMachine:\n      definition:\n        Comment: \"A simple state machine\"\n        StartAt: \"Hello\"\n        States:\n          Hello:\n            Type: Pass\n            End: true","stepFunctions:\n  stateMachines:\n    myApiStateMachine:\n      definition:\n        Comment: \"A state machine triggered by API Gateway\"\n        StartAt: \"Hello\"\n        States:\n          Hello:\n            Type: Pass\n            End: true\n      events:\n        - httpApi:\n            path: /my-workflow\n            method: post\n            async: true\n            response:\n              headers:\n                Content-Type: \"'application/json'\"\n              template: \"$input.json('$')\""],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# serverless.yml\nservice: my-step-functions-service\n\nframeworkVersion: '3'\n\nplugins:\n  - serverless-step-functions\n\nprovider:\n  name: aws\n  runtime: nodejs20.x # Or any supported runtime\n  region: us-east-1\n  stage: dev\n  httpApi:\n    cors: true\n\nstepFunctions:\n  stateMachines:\n    mySimpleWorkflow:\n      name: my-simple-workflow-${sls:stage}\n      comment: \"A basic workflow that waits and then succeeds\"\n      definition:\n        Comment: \"My Simple Workflow\"\n        StartAt: \"WaitState\"\n        States:\n          WaitState:\n            Type: Wait\n            Seconds: 5\n            Next: \"SucceedState\"\n          SucceedState:\n            Type: Succeed\n      events:\n        - httpApi:\n            path: /start-workflow\n            method: post\n            async: true\n            response:\n              headers:\n                Content-Type: \"'application/json'\"\n              template: \"$input.json('$')\"","lang":"javascript","description":"This `serverless.yml` configuration demonstrates how to define a simple AWS Step Functions state machine with a basic `Wait` and `Succeed` state. It also shows how to trigger this workflow asynchronously via an AWS HTTP API endpoint, configuring the necessary API Gateway integration. This configuration should be placed in your `serverless.yml` file and deployed using `sls deploy`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}