Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.