I'm working on an application which is hosted on AWS elastic beanstalk. I'm storing a few keys and passwords as environment variables within elastic beanstalk. These variables are stored into java variables using @data and @value annotations. I want to encrypt these environment variables using KMS and decrypt it before storing it in the variable.
How should i achieve this?