Elsatic Benstalk getting the environment variables from Parameter Store

0

Hi all, this is my first post here after reading a lot of articles and the official AWS EB documentation. I spent a couple of days trying to find a solution, but I did not find it, for now :).

I have an EB environment and due to the 4095Kb limitation (a shame), I have to get the environment variables from the Parameter Store . I've created two bash scripts, (thanks to a few articles I read), to get these parameters and "inject" them to the /opt/elasticbeanstalk/deployment/env file. These two scripts have the same code, and I added them to /hooks/postdeploy and to confighooks/postdeploy, everything seems to work fine, because the parameters from the Parameter Store are injected correctly to the env file, but... the variables are not accessible in my PHP code. The "funny" thing is that if I add the same variable to the Elastic Beanstalk configuration->software UI, the variable is duplicated in the env file and in the "cfn-metadata-cache.json", but if I remove it again from the EB UI ( configuration->software ) the variable disappears, voila! (it does not matter if it still exists in the parameter store) Is this an EB bug? I really would like to be able to add all my environment variables to the Parameter Store, any ideas? Thanks in advance

note: I added more details in this post I have created in StackOverflow https://stackoverflow.com/questions/74258162/elastic-benstalk-environment-variables

질문됨 2년 전115회 조회
답변 없음

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

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

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

관련 콘텐츠