Skip to content

Instantly share code, notes, and snippets.

@ywauto83
Created April 8, 2020 04:10
Show Gist options
  • Select an option

  • Save ywauto83/e19c6933ff6f9a9c7ffc5ac6e9eb2fca to your computer and use it in GitHub Desktop.

Select an option

Save ywauto83/e19c6933ff6f9a9c7ffc5ac6e9eb2fca to your computer and use it in GitHub Desktop.

Revisions

  1. ywauto83 revised this gist Apr 8, 2020. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions StepFunction-task-SNS.py
    Original file line number Diff line number Diff line change
    @@ -22,3 +22,9 @@
    }
    }

    Input
    ---
    {
    "TransactionId": "abc",
    "Type": "PURCHASE"
    }
  2. ywauto83 created this gist Apr 8, 2020.
    24 changes: 24 additions & 0 deletions StepFunction-task-SNS.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    {
    "Comment":"Transaction Processor State Machine Using SNS",
    "StartAt":"ProcessTransaction",
    "States":{
    "ProcessTransaction":{
    "Type":"Pass",
    "Next":"BroadcastToSns"
    },
    "BroadcastToSns":{
    "Type":"Task",
    "Resource":"arn:aws:states:::sns:publish",
    "Parameters":{
    "TopicArn":"Replace Me!",
    "Message":{
    "TransactionId.$":"$.TransactionId",
    "Type.$":"$.Type",
    "Source": "Step Functions!"
    }
    },
    "End":true
    }
    }
    }