Daniel
Daniel

Reputation: 138

How to increase timeout of Amplify Nextjs SSR function from 10s to 30s?

I'm using a Next.js project on AWS Amplify. On my local environment, one of my API routes averages around 18-20 seconds to finish as it makes multiple (6 total) third-party API requests to services outside of AWS. However, When deploying to Amplify, the API route gets timed-out at 10 seconds.

I've tried manually setting the Amplify Lambda function to 30 seconds, this works BUT it gets overwritten back to 10 seconds after every deployment. (see screenshot below)

CloudWatch log:
...

END RequestId: 0f5be97f-9519-4d07-8c51-45ec9968171f

REPORT RequestId: 0f5be97f-9519-4d07-8c51-45ec9968171f  Duration: 10010.52 ms   Billed Duration: 10000 ms   Memory Size: 512 MB Max Memory Used: 159 MB 

2021-08-27T16:22:55.214Z 0f5be97f-9519-4d07-8c51-45ec9968171f Task timed out after 10.01 seconds

aws amplify lambda function config

Upvotes: 2

Views: 3392

Answers (1)

Felipe N Moura
Felipe N Moura

Reputation: 1617

It looks like they (AWS team) have fixed it!

Now, it keeps track of the timeout you had previously saved \o/

Upvotes: 1

Related Questions