src/kelp/__init__.py
def invoke_functions(functions):
    """Invoke lambda functions so logs get captured by cloudtrail"""
    for function in functions:
        client = boto3.client("lambda", region_name="us-east-1")
        logger.info(f"Invoking {function}")
        response = client.invoke(
            FunctionName=function, InvocationType="RequestResponse", LogType="Tail"
        )
        if response["StatusCode"] != 200:
            logger.exception("Lambda failed to execute")
            sys.exit()
Invoke lambda functions so logs get captured by cloudtrail
Invoke lambda functions so logs get captured by cloudtrail
Invoke lambda functions so logs get captured by cloudtrail
def invoke_functions(functions):
    for function in functions:
        client = boto3.client("lambda", region_name="us-east-1")
        logger.info(f"Invoking {function}")
        response = client.invoke(
            FunctionName=function, InvocationType="RequestResponse", LogType="Tail"
        )
        if response["StatusCode"] != 200:
            logger.exception("Lambda failed to execute")
            sys.exit()
def invoke_functions ( functions ) : for function in functions : client = boto3 . client ( "lambda" , region_name = "us-east-1" ) logger . info ( f"Invoking {function}" ) response = client . invoke ( FunctionName = function , InvocationType = "RequestResponse" , LogType = "Tail" ) if response [ "StatusCode" ] != 200 : logger . exception ( "Lambda failed to execute" ) sys . exit ( )
Invoke lambda functions so logs get captured by cloudtrail
Invoke lambda functions so logs get captured by cloudtrail
"""Invoke lambda functions so logs get captured by cloudtrail"""
functions