Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md Revised action and payload schemas, initial implementation of POST ac… Jun 16, 2019
template.yaml Revise example template Jul 3, 2019

README.md

Example

This example creates a state machine that sends you an email requesting you to approve or reject a task, and then another email confirming the result.

Usage

# set these
NAME=YOUR_NAME
EMAIL=me@example.com
STACK_NAME=SfnCallbackUrls # the deployed sfn-callback-urls stack
EXAMPLE_STACK_NAME=SfnCallbackUrlsExample # the name you want the example stack deployed as


FUNC=$(aws cloudformation describe-stacks --stack-name $STACK_NAME --query "Stacks[0].Outputs[?OutputKey=='Function'].OutputValue" --output text)

aws cloudformation deploy --template-file template.yaml --stack-name $EXAMPLE_STACK_NAME --parameter-overrides Email=$EMAIL CreateUrlsFunction=$FUNC --capabilities CAPABILITY_IAM

# Go to your email and confirm the SNS subscription

STATE_MACHINE=$(aws cloudformation describe-stacks --stack-name $EXAMPLE_STACK_NAME --query "Stacks[0].Outputs[?OutputKey=='StateMachine'].OutputValue" --output text)

aws step-functions start-execution --state-machine-arn $STATE_MACHINE --input "{\"name\": \"$NAME\"}"
You can’t perform that action at this time.