Race Condition Error in AWS-Parameters-and-Secrets-Lambda-Extension

0

Hey, we tried to use the AWS-Parameters-and-Secrets-Lambda-Extension to get some parameters within our Lambda Function.

Unfortunately the code of the layer throws an error. As far I can tell from the outside it looks like a race condition error. It mostly happens after the function got deployed and runs for the first time, or when it comes back from a cold start.

I do not know if this is the right place to report it, but here are some details. Let me know if there is a Repo where I can create an Issue.

Environment:
Lambda, arm64, Node.js 16.x
Layer: arn:aws:lambda:eu-west-1:015030872274:layer:AWS-Parameters-and-Secrets-Lambda-Extension-Arm64:2

Error:

fatal error: concurrent map read and map write

goroutine 8 [running]:

golang.a2z.com/GoAmzn-SSMParameterStoreLambdaExtension/cache.(*Cache).Add(0x40001a6140, {0x31f0e0?, 0x400001f990}, {0x36e2c0?, 0x4000484900}, 0x6a3780?)

/local/p4clients/pkgbuild-6j8da/workspace/src/GoAmzn-SSMParameterStoreLambdaExtension/cache/cache.go:69 +0x114

golang.a2z.com/GoAmzn-SSMParameterStoreLambdaExtension/parameters.(*Retriever).Get(0x40001b4280, 0x40001e1b90)

/local/p4clients/pkgbuild-6j8da/workspace/src/GoAmzn-SSMParameterStoreLambdaExtension/parameters/retriever.go:107 +0x84c

...

/opt/brazil-pkg-cache/packages/GoLang/GoLang-1.x.89619.0/AL2_x86_64/DEV.STD.PTHREAD/build/lib/src/net/http/transport.go:1752 +0x1234

The stack trace is very long so i skipped a lot in between ... if one need it please ask.

Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen