Appsync, Serverless Lambda, RDS (aurora postgresql) API response taking more time (avg. 1.5sec)

0

Each appsync query/mutation taking more time to response. Average API response time is 1.5sec. Even static text returning from lambda also taking reponse time around 700ms. I've tryed with enable caching in Appsync. Can you please suggest to me how can I improve response time ?

已提問 4 個月前檢視次數 125 次
1 個回答
0

Hi,

Firstly, we need to find which part occupied the most long time. Have you checked the duration of Lambda?
You can check the aws lambda cloud watch log and observe the report[1].
You should see the following output:

START RequestId: 57f231fb-1730-4395-85cb-4f71bd2b87b8 Version: $LATEST
"AWS_SESSION_TOKEN": "AgoJb3JpZ2luX2VjELj...", "_X_AMZN_TRACE_ID": "Root=1-5d02e5ca-f5792818b6fe8368e5b51d50;Parent=191db58857df8395;Sampled=0"",ask/lib:/opt/lib",
END RequestId: 57f231fb-1730-4395-85cb-4f71bd2b87b8
REPORT RequestId: 57f231fb-1730-4395-85cb-4f71bd2b87b8  Duration: 79.67 ms      Billed Duration: 80 ms         Memory Size: 128 MB     Max Memory Used: 73 MB

You can check the Duration and Memory Size and Max Memory Used to determine whether to increase your lambda memory.

[1]https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.html#monitoring-cloudwatchlogs-console

profile picture
已回答 4 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南