Config Source

View Licence Agreement

Config manager component. Has methods for getting configuration for lambdas. Use Config class to get the correct methods we use for each action. Using SSMConfig or DynamoConfig directly is discouraged. Especially SSMConfig, because SSM throttles and has limits we reached in the past. Using these methods requires the Role to have permissions to access SSM and/or Dynamo for requested resources.

class sosw.components.config.ConfigSource(test=False, sources=None, config=None)[source]

A strategy adapter for config. Returns config from the selected config source. You can implement your own functions using these clients, and they can even call different configurations.

Parameters:
  • sources (str) – Config clients to initialize. Supported: SSM and Dynamo (default). Could be both, comma-separated. The first one then becomes default.

  • config (dict) – Custom configurations for clients. Should be in ssm_config, dynamo_config, etc. Don’t be confused, but sometimes configs also need their own configs. :)