Push/publish events on Step Functions state transition

0

I'd like to notify an external observer (a client web app in my current case, but interested in other use cases too) of status updates when a Step Functions-orchestrated workflow progresses - in an event-driven way rather than by polling the execution history API.

AWS
전문가
Alex_T
질문됨 4년 전404회 조회
1개 답변
0
수락된 답변

I tested out approach using CloudWatch and it works. I enabled CloudWatch logging, it logs event TaskStateEntered on start and TaskStateExited on exit. You can create filter on log like { $.type="TaskStateExited"}

Sample CloudWatch log entry

{
    "id": "6",
    "type": "TaskStateExited",
    "details": {
        "name": "State1",
        "output": "{\"who\":\"amit\",\"taskresult\":{\"statusCode\":200,\"body\":\"\\\"hello from amit\\\"\"}}"
    },
    "previous_event_id": "5",
    "event_timestamp": "1593780767604",
    "execution_arn": "arn:aws:states:us-east-1:xxx:execution:MyStateMachine:fa8cfe8f-492d-7e27-7492-6aa20f12fe18"
}
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠