I'm having some problems adding wordpress salts & keys as environment variables in elastic beanstalk (syntax error)
-bash: 1{: command not found
-bash: 8!~+w: command not found
-bash: br}P9^: No such file or directory
-bash: =:JDKbbfk: command not found
-bash: /etc/profile.d/eb_envvars.sh: line 11: unexpected EOF while looking for matching ``'
-bash: /etc/profile.d/eb_envvars.sh: line 21: syntax error: unexpected end of file
Generated secret keys with : https://api.wordpress.org/secret-key/1.1/salt/
Summary - use alphanumeric salts and keys.
I'm following the guide here and it uses a YAML formatted file to define the salts and keys for WordPress. When creating a new environment, the environment variables are read and loaded correctly. However when it tries to launch the instances it chokes on the variables. I confirmed this when looking through the messages file from the instance logs.
Wondered if I was defining the YAML file correctly, but have seen a number of reports of similar problems. I think this question hits the nail on the head. So I replaced the keys and salts from the WordPress generator with ones from here.
I set the password length to 64 and excluded symbols, included numbers, included lowercase characters, included uppercase characters, included similar characters, excluded ambiguous characters. It came up with strings like these:
S8TZaYb0dFL72A4ZwMKRxlUxmuwhq4UtLQhCCRR584SZ4XwIiQ0fIWu6WptauZ2V
b6wkMN2RtC0g67Wi2oHSYaDAZvyX2ECW98MiczoTHWKTxSK6s3bx9eLq9fkkqtKy
Basically just alphanumeric strings. Once I used those the instances started launching correctly and Elastic Beanstalk was a happy chappy.
So whatever is happening inside that instance requires alphanumeric keys and salts. Other characters may not work.