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 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则