[{"data":1,"prerenderedAt":56},["ShallowReactive",2],{"workflow-circuit-breaker-workflow":3},{"id":4,"title":5,"cleanup":6,"contributors":11,"deploy":13,"description":16,"diagram":17,"extension":18,"framework":19,"gitHub":20,"introBox":29,"level":35,"meta":36,"resources":37,"s3URL":43,"services":44,"simplicity":47,"stem":48,"testing":49,"type":53,"usecase":54,"videoId":28,"__hash__":55},"workflows\u002Fworkflows\u002Fcircuit-breaker-workflow.json","Circuit breaker workflow",{"headline":7,"text":8},"Cleanup",[9,10],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[12],"content\u002Fcontributors\u002Fanitha-deenadayalan.json",{"text":14},[15],"sam deploy --guided","Prevent a caller service from retrying another callee service call that has previously caused repeated timeouts or failures. It can also detect when the callee service is functional again.","\u002Fassets\u002Fimages\u002Fworkflows\u002Fcircuit-breaker-workflow.png","json","AWS SAM",{"template":21,"payloads":26},{"repoURL":22,"templateDir":23,"templateFile":24,"ASL":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fcircuit-breaker-netcore-blog\u002Ftree\u002Fmain\u002Fcircuit-breaker\u002F","circuit-breaker\u002F","template.yaml","statemachine\u002Fcircuitbreaker.asl.json",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32,33,34],"The Step Functions workflow provides circuit breaker capabilities. When a service wants to call another service, it starts the workflow with the name of the callee service.","The workflow gets the circuit status from the CircuitStatus DynamoDB table, which stores the currently degraded services. If the CircuitStatus contains an unexpired record for the service called, then the circuit is open. The Step Functions workflow returns an immediate failure and exit with a FAIL state.","If the CircuitStatus table does not contain an item for the called service or contains an expired record, then the service is operational. The ExecuteLambda step in the state machine definition invokes the Lambda function sent through a parameter value. The Step Functions workflow exits with a SUCCESS state, if the call succeeds.","100",{},{"headline":38,"bullets":39},"Additional resources",[40],{"text":41,"link":42},"Using the circuit breaker pattern with AWS Step Functions and Amazon DynamoDB","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fusing-the-circuit-breaker-pattern-with-aws-step-functions-and-amazon-dynamodb\u002F","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fworkflows\u002Fcircuit-breaker-workflow\u002Fcloudformation.yml",[45,46],"dynamodb","lambda","2 - Pattern","workflows\u002Fcircuit-breaker-workflow",{"headline":50,"text":51},"Testing",[52],"See the GitHub repo for detailed testing instructions.","Standard","Microservices","ikPmk0AA8P1bjoFePpVqZ_eX2zC4AgoNFKCM4cKzSug",1781692549415]