AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: > A Step Functions Standard Workflow sending payloads to an SQS queue. This pattern will not wait for a callback from SQS Resources: ########################################################################## # SQS # ########################################################################## MyQueue: Type: AWS::SQS::Queue ########################################################################## # STEP FUNCTION # ########################################################################## StateMachinetoSQS: Type: AWS::Serverless::StateMachine Properties: Definition: StartAt: SendToMyQueue States: SendToMyQueue: Type: Task Resource: "arn:aws:states:::sqs:sendMessage" Parameters: QueueUrl: !Ref MyQueue MessageBody.$: "$.message" End: True Role: !GetAtt [ MyStateMachineExecutionRole, Arn ] ########################################################################## # Roles # ########################################################################## MyStateMachineExecutionRole: Type: "AWS::IAM::Role" Properties: AssumeRolePolicyDocument: Version: "2012-10-17" Statement: - Effect: "Allow" Principal: Service: - !Sub states.${AWS::Region}.amazonaws.com Action: "sts:AssumeRole" Path: "/" Policies: - PolicyName: SQSPolicy PolicyDocument: Version: "2012-10-17" Statement: - Effect: Allow Action: - 'sqs:SendMessage' Resource: !GetAtt MyQueue.Arn ########################################################################## # Outputs # ########################################################################## Outputs: StateMachinetoSQSArn: Value: !Ref StateMachinetoSQS Description: StateMachinetoSQS Arn MyQueueURL: Value: !Ref MyQueue Description: MyQueue URL