Last active
March 26, 2018 12:02
-
-
Save Aakash06/b76b48aa3356aea33a9aaec13f74a06b to your computer and use it in GitHub Desktop.
AWS Step Function User Verification Check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Comment":"state machine for authorization and capture", | |
"StartAt":"newUserRegistered", | |
"States":{ | |
"newUserRegistered":{ | |
"Type":"Task", | |
"Resource":"<ARN OF YOUR LAMBDA>", | |
"Next":"waitForVerification" | |
}, | |
"waitForVerification": { | |
"Type": "Wait", | |
"Seconds": 1800, | |
"Next": "FetchVerificationResult" | |
}, | |
"FetchVerificationResult":{ | |
"Type":"Choice", | |
"Choices":[ | |
{ | |
"Variable":"$.status", | |
"StringEquals":"NO", | |
"Next":"DeleteDataFromDB" | |
}, | |
{ | |
"Variable":"$.status", | |
"StringEquals":"YES", | |
"Next":"Done" | |
} | |
] | |
}, | |
"DeleteDataFromDB":{ | |
"Type":"Task", | |
"Resource":"<ARN OF YOUR LAMBDA(Which Delete data from DB)>", | |
"InputPath":"$.result", | |
"End":true | |
}, | |
"Done": { | |
"Type": "Succeed" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment