Aws SDk Go V2 Lambda, deadline is 1970-01-1 while local debugging

0

Hi,

I have simple lambda code:

func handleLambdaEvent(ctxOrg context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
	orgDL, _ := ctxOrg.Deadline()
	fmt.Println(orgDL)

when its deployed to aws and called ( from API Gateway ) I see in logs current timestamp + X seconds, but when I run this locally and use awslambdarpc to call it I see:

1970-01-01 00:00:00 +0000 UTC

which causes some problems in other parts of this lambda. Is it possible somehow, using awslambdarpc or maybe some config ( just for local ) to define this deadline value ?

Baku
已提問 1 年前檢視次數 175 次
2 個答案
0

I think it's very odd that the timestamp is the beginning of the Unix epoch. There's been a few other questions which I think are related given that the console in those cases also looks like it is set to January 1, 1970. Please contact our support team to check on the status of the account.

profile pictureAWS
專家
已回答 1 年前
0

ok looks like original awslambdarpc client is simply missing Deadline value set, so I prepared this default deadline to now()+15 seconds in my fork:

https://github.com/goodsafe-eu/awslambdarpc/commit/b6181a1acc581c12945c7361a3a3e4d5ad5f59c4 and now works fine

Baku
已回答 1 年前

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

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

回答問題指南