AWS Parameters and Secrets Lambda Extension throwing BadRequestException

0

I have been trying to use the AWS Parameters and Secrets Lambda Extension to access parameters from the parameter store using this guide https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html

The problem is that if I try to access the parameter store(which runs on http://localhost:2773) as soon as the lambda starts up then I get a 400 BadRequestException error from the parameter store with the message not ready to serve traffic, please wait

If I add a delay of 100ms before accessing the parameter store then it works fine and successfully fetches the parameters. The 100ms delay is a blocker for using it in any production environment.

Is there a way to use the extension without introducing any wait times for initialization?

Thanks

  • I am also facing the same issue. I am trying to cache the database connection inside init method (using Java for Lambda function development. Trying to load DB connection in handler's constructor). DB credentials are stored in Secret manager. The 'Secret Manager Lambda Layer' is used to access Secret manager.

Sameer
gefragt vor einem Jahr266 Aufrufe
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