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
demandé il y a un an266 vues
Aucune réponse

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