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
demandé il y a un an175 vues
2 réponses
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
répondu il y a un an
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions