AWS SSM Parameter Store in Elastic Beanstalk

Viewed 491

I'm using AWS Elastic Beanstalk to host my application with two environments (production and staging).

I would like to store my environment variables in AWS System Manager Parameter Store (and AWS Secrets Manager), but I don't find simple ways to do it.

Solutions I've considered:

1) ebextensions

Creating an ebextensions to fetch the SSM parameter store variables during a deployment. But it means I'll need to perform a deployment each time I change an environment variable.

Do you have a script exemple to do it properly?

2) a lambda function

Creating a lambda to fetch the SSM parameter store variables, and use eb setenv to set them on Elastic Beanstalk. Then, I would invoke this lambda function in a ebextension.

Is it hacky?

What would be the best solution?

0 Answers
Related