def list_lambda_attached_secgroups(lambda_aws) ->list:
    """
    List security groups attached to Lambda functions
    """
    lambda_attached_groups = []
    boto_lambda = lambda_aws.list_functions()
    for lambda_obj in boto_lambda['Functions']:
        if 'VpcConfig' in lambda_obj:
            for security_group in lambda_obj['VpcConfig']['SecurityGroupIds']:
                lambda_attached_groups.append(security_group)
    return lambda_attached_groups
