Skip to content

Environment variables in beanstalk are removed

0

Using the configuration page for a beanstalk server I have added a couple of environment variables. We have done this before: you add them in the list, you either click apply or continue and they are saved. I have double checked: the environment variables are there in the list.

I update my application using those variables, and it fails because it is missing those variables which is odd. I add them again, and they appear in the list. But after switching to another page and back to the configuration, the variables are gone.

On this page it does mention that beanstalk has a limit of 4096 bytes*, which might be the issue. But even if this is the case, I would consider letting me think updating my environment variables succeeded while in the background they did not persist is a bug.

*https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-softwaresettings.html#environments-cfg-softwaresettings-console

asked 2 years ago378 views

2 Answers
1

Have you got any error in Beanstalk logs ?

Try adding the variables with eb setenv VAR1=value1 VAR2=value2 so you can see what triggers errors.

Anyway if it's a Bug, AWS Support can help you with this.

EXPERT

answered 2 years ago

0

I have resolved it for now by moving some not-so-secret environment variables into my codebase. By doing so I probably got under the 4kb limit and afterwards I could add the new environment variables.

So for me the case is solved. Nonetheless I think it is a UI bug that might impact others: if the variables are not going to be persisted due to a 4kb limit, it should error instead of showing the new environment variables in the UI as if persisting them succeeded.

answered 2 years ago

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.