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

asked a year ago112 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions