Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aakash06/b76b48aa3356aea33a9aaec13f74a06b to your computer and use it in GitHub Desktop.
Save Aakash06/b76b48aa3356aea33a9aaec13f74a06b to your computer and use it in GitHub Desktop.
AWS Step Function User Verification Check
{
"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