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
asked a year ago171 views
2 Answers
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
EXPERT
answered a year ago
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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions