Reputation: 830
I'm using the serverless framework to build a step function which receives input and then uses this input to send a message via SNS.
How do I pass the input to the message field?
Here is my definition and attempt:
stepFunctions:
stateMachines:
hellostepfunc1:
name: testermachine
definition:
Comment: "test machine"
StartAt: SNSState
States:
SNSState:
Type: Task
InputPath: $
Resource: arn:aws:states:::sns:publish
Parameters:
TopicArn:
Fn::GetAtt: [ MyTopic, TopicArn ]
Message: {InputPath: $}
End: true
Upvotes: 0
Views: 719
Reputation: 522
You can perform a SNS publish operation within a Step Function. See AWS Docs - Connect to SNS from Step Functions
Upvotes: 1