示例#1
0
        /// <summary>
        /// Pulls all of the SSM parameters for a given region and path.  This package requires running with a role
        /// or that AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set as environment variables.
        ///
        /// Additionally,
        /// DEFAULT_AWS_REGION (us-east-1 is assumed if none provided)
        /// and SSM_PARAMETER_PATH ("/" is assumed if none provided)
        /// should be set as environment variables
        /// </summary>
        public SecretHandler()
        {
            _envreader = new EnvironmentVariableReader();

            _region        = _envreader.GetValue("DEFAULT_AWS_REGION") ?? "us-east-1";
            _parameterPath = _envreader.GetValue("SSM_PARAMETER_PATH");
            _injector      = new SsmInjector();
            Initialize();
        }