Reputation: 51
I am building a stack in AWS nowadays and I had to use same constant parameters and variables repeatedly in different services. Is there a way or service to store and access variables and nested/dictionary-like parameters?
Upvotes: 0
Views: 1421
Reputation: 23612
AWS Systems Manager Parameter Store sounds like the right service here:
Parameter Store, a capability of AWS Systems Manager, provides secure, hierarchical storage for configuration data management and secrets management. You can store data such as passwords, database strings, Amazon Machine Image (AMI) IDs, and license codes as parameter values. You can store values as plain text or encrypted data. You can reference Systems Manager parameters in your scripts, commands, SSM documents, and configuration and automation workflows by using the unique name that you specified when you created the parameter.
You can store your constant parameters within Parameter Store, and then access the values in the various ways mentioned above (in addition to using the SDK client).
Top tip: Plan out your hierarchical paths before deploying to production!
They help you tag and organise your parameters per service and/or per environment (and/or per anything else).
For example, you can have the same parameter name -my-special-config
with 2 different hierarchical paths to store different values per environment.
dev/my-special-config
prod/my-special-config
It saves you time to solidify your paths beforehand - you cannot 'rename' them, you will have to create a new parameter and delete the old one.
Upvotes: 1