S3 object and lambda function in step machine with the asynchronous express workflows

0

My state machine starts with a MAP state. Inside the Map state, there are 2 tasks, one after one (task#1 invokes lambda A, task#2 invokes lambda B). The lambda A will process the files conversion, upload those files into S3, and return a S3 object key. The lambda B will grab the S3 object key from task#1, get the object from S3, and then interact with the third party API.

My question is that before the lambda B is invoked, is there a way to notify the state machine that the files have been saved in S3 and ready to be read? Could we implement the S3-EventBridge in the asynchronous express workflows?

1개 답변
0
수락된 답변

Why do you need to notify the state machine about it? Lambda A writes the file and only returns when the file is on S3. Lambda B will not be invoked until Lambda A finishes (assuming they are in sequence and not in a Parallel state).

profile pictureAWS
전문가
Uri
답변함 2년 전
  • My bad, forget to mention that I am using python boto3 SDK for the lambda. When the uploading through upload_file() is finished, it returns nothing. So I am not sure that it means the files uploading are done or just S3 accepts the API call without an exception.

  • Should be done when it returns.

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

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

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

관련 콘텐츠