The config-loader reads configurations from both the local configuration file and environment variables and sets them using the viper
package. A user can read them later using viper
. For example:
viper.GetString("my_key")
After import the package, you simply call:
config.LoadConfig("MY_CONF")
For more detail, please look into example
folder.
AWS Parameter Store store parameter and provide to client via SSM service
- Add this policy to your IAM, for example:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ssm:GetParameters",
"ssm:PutParameters"
],
"Resource": "*"
}
]
}
- configure AWS credentials before use aws/ssm package