![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
加密貨幣新聞文章
Have you ever wanted to pause an automated workflow to wait for a human decision?
2025/05/13 07:17
Have you ever wanted to pause an automated workflow to wait for a human decision? Maybe you need approval before provisioning cloud resources, promoting a machine learning model to production, or charging a customer’s credit card.
In many data science and machine learning workflows, automation gets you 90% of the way — but that critical last step often needs human judgment. Especially in production environments, model retraining, anomaly overrides, or large data movements require careful human review to avoid expensive mistakes.
In my case, I needed to manually review situations where my system flagged more than 6% of customer data for anomalies — often due to accidental pushes by customers. Before I implemented a proper workflow, this was handled informally: developers would directly update production databases (!) — risky, error-prone, and unscalable.
To solve this, I built a scalable manual approval system using AWS Step Functions, Slack, Lambda, and SNS — a cloud-native, low-cost architecture that cleanly paused workflows for human approvals without spinning up idle compute.
In this post, I’ll walk you through the full design, the AWS resources involved, and how you can apply it to your critical workflows.
Let’s get into it 👇
The Solution
My application is deployed in the AWS ecosystem, so we’ll use Aws Step Functions to build a state machine that:
Here is a youtube video showing the demo and actual application in action:
I have also hosted the live demo app here →👉 https://v0-manual-review-app-fwtjca.vercel.app
All code is hosted here with the right set of IAM permissions.
Step-by-Step Implementation
The flow above generates a dataset, uploads it to AWS S3 and if a review is required, then invokes the Manual Review lambda. On the manual review step, we’ll use a Task lambda with an invoke on WaitForTaskToken, which pauses execution until resumed. The lambda reads the token this way:
This Lambda sends a Slack message that includes the task token so the function knows what execution to resume.
2. Before the we send out the slack notification, we need to
I followed the youtube video here for my setup.
3. Once the above is setup, setup the variables into the web-hook step of the slack workflow:
And use the variables with a helpful note in the following step:
The final workflow will look like this:
4. Send a Slack Notification published to an SNS topic (you can alternately use slack-sdk as well) with job parameters. Here is what the message will look like:
This Lambda sends a Slack message that includes the task token so the function knows what execution to resume.
5. Once a review notification is received in slack, the user can approve or reject it. The step function goes into a wait state until it receives a user response; however the task part is set to expire in 24 hours, so inactivity will timeout the step function.
Based on whether the user approves or rejects the review request, the rawPath gets set and can be parsed here: code
The receiving API Gateway + Lambda combo:
Example:
Note: Lambda configured with WaitForTaskToken must wait. If you don’t send the token, your workflow just stalls.
Bonus: If you need email or SMS alerts, use SNS to notify a broader group.Just sns.publish() from within your Lambda or Step Function.
Testing
Once the manual approval system was wired up, it was time to kick the tires. Here’s how I tested it:
I tested all major paths:
Behind the scenes, I also verified that :
I highly recommend testing not just happy paths, but also “what if nobody clicks?” and “what if Slack glitches?” — catching these edge cases early saved me headaches later.
Lessons Learned
Wrapping Up
Adding human-in-the-loop logic doesn’t have to mean duct tape and cron jobs. With Step Functions + Slack, you can build reviewable, traceable, and production-safe approval flows.
If this helped, or you’re trying something similar, drop a note in the comments! Let’s build better workflows.
Note: All images in this article were created by the author
免責聲明:info@kdj.com
所提供的資訊並非交易建議。 kDJ.com對任何基於本文提供的資訊進行的投資不承擔任何責任。加密貨幣波動性較大,建議您充分研究後謹慎投資!
如果您認為本網站使用的內容侵犯了您的版權,請立即聯絡我們(info@kdj.com),我們將及時刪除。
-
-
- 大西洋十字路口的鎳發現:EV供應鏈的遊戲規則改變者
- 2025-07-09 18:50:12
- 第一大西洋鎳的Awaruite發現是通過其環保,無冶煉廠的加工來重塑電動汽車供應鏈,並在全球挑戰中提供了國內解決方案。
-
- 資深擁有的Aloha迷你高爾夫:全國范圍內的島嶼樂趣
- 2025-07-09 18:55:12
- 由退伍軍人創立的Aloha Mini高爾夫正在全國范圍內擴展。該博客探討了這種夥伴關係及其對企業家和社區的意義。
-
- AI癌症檢測:Radnet技術與醫療保健夥伴關係改善乳腺癌篩查
- 2025-07-09 18:55:12
- Radnet與主要醫療團體合作,推出AI驅動的乳腺癌檢測,增強早期檢測和患者結局。
-
- Medicare覆蓋範圍,癌症復發和確切的科學:改變遊戲規則
- 2025-07-09 19:00:13
- 精確科學的OnCodetect™測試可確保醫療保險的覆蓋範圍,標誌著大腸癌患者和個性化醫學的關鍵時刻。
-
- 轉向未來:中國的IRCB系統驅動儲蓄和自動創新
- 2025-07-09 19:00:13
- 中國的汽車行業看到了CAAS的IRCB轉向系統,有望儲蓄並推進自動駕駛。
-
-
-
- 加密賽,Binance Stablecoin和Alt季節:有什麼交易?
- 2025-07-09 19:30:13
- 查看加密貨幣預售市場,二鏈球菌流入的影響以及2025年的山寨幣季節的潛力。