Using Lambda to run s3 export that takes longer than 15 mins

0

Hi , I have a lambda that calls s3 export on aurora postgres tables . Couple of tables take longer than 15 mins . This causes the s3 export to fail in some cases . Is there a way I can just use lambda to trigger the s3 export and then let aurora take care of completing the query . I can use a step function and another lambda to check if there is any s3 export still running and take the status of s3 export from their using wait and a loop . I wanted to ask how can i let the first lambda just trigger the s3 export and not fail when the response takes longer than 15 minutes for longer running exports . Thanks Pradeep Singh

질문됨 일 년 전504회 조회
4개 답변
1

Unfortunately, Lambda cannot run for more than 15 minutes.
https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-timeout-console

So I think the only way to handle this is to use the Step function as you are doing.

If a process takes more than 15 minutes to execute Lambda, it may be better to use ECS or AWS Batch.

profile picture
전문가
답변함 일 년 전
0

Hi, another way is to use a container image as a Fargate service. The Lambda + Step may not work as the hard 15 min limit may interrupt the synchronous SDK call for S3 export.

We had a similar case and went to Fargate for long calls to other AWS services.

profile pictureAWS
전문가
답변함 일 년 전
0

Yeah . We wanted to use Fargate but that's kind of not allowed at this moment . We will have to wait for approvals and that depends on another project that is running currently . Is there a way to make the SDK call for S3 export asynchronous

답변함 일 년 전
0

Can I use StartExportTask activity in Step function . Can it be used to provide custom queries for export to s3

답변함 일 년 전

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

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

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

관련 콘텐츠