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
질문됨 일 년 전266회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠