def get_client()

in src/lambda_functions/cw_custom_widget_python/lib/client.py [0:0]


def get_client(service_name, config=CLIENT_CONFIG):
    """Get Boto3 Client"""
    global _HELPERS_SERVICE_CLIENTS
    if service_name not in _HELPERS_SERVICE_CLIENTS:
        LOGGER.debug("Initializing global boto3 client for %s", service_name)
        _HELPERS_SERVICE_CLIENTS[service_name] = boto3.client(service_name, config=config)
    return _HELPERS_SERVICE_CLIENTS[service_name]