{"action":"created","issue":{"url":"https://api.github.com/repos/awslabs/aws-config-rdk/issues/27","repository_url":"https://api.github.com/repos/awslabs/aws-config-rdk","labels_url":"https://api.github.com/repos/awslabs/aws-config-rdk/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/awslabs/aws-config-rdk/issues/27/comments","events_url":"https://api.github.com/repos/awslabs/aws-config-rdk/issues/27/events","html_url":"https://github.com/awslabs/aws-config-rdk/issues/27","id":302192719,"number":27,"title":"Returning a list:'evaluations' with compliance and annotation appended as a dictionary results in an error.","user":{"login":"anthderr","id":34994161,"avatar_url":"https://avatars0.githubusercontent.com/u/34994161?v=4","gravatar_id":"","url":"https://api.github.com/users/anthderr","html_url":"https://github.com/anthderr","followers_url":"https://api.github.com/users/anthderr/followers","following_url":"https://api.github.com/users/anthderr/following{/other_user}","gists_url":"https://api.github.com/users/anthderr/gists{/gist_id}","starred_url":"https://api.github.com/users/anthderr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthderr/subscriptions","organizations_url":"https://api.github.com/users/anthderr/orgs","repos_url":"https://api.github.com/users/anthderr/repos","events_url":"https://api.github.com/users/anthderr/events{/privacy}","received_events_url":"https://api.github.com/users/anthderr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-05T07:09:59Z","updated_at":"2018-03-11T07:00:44Z","closed_at":null,"author_association":"NONE","body":"Code Snippet:\r\n\r\n```\r\nif mfa_device_details['MFADevices'] == []:\r\n            print('User: '+userName+' is NOT-COMPLIANT!')\r\n            eval[\"ComplianceType\"] = \"NON_COMPLIANT\"\r\n            eval[\"Annotation\"] = \"No MFA Device detected for user\"\r\n            evaluation.append(eval)\r\n            return evaluation\r\n```\r\n\r\nERROR:\r\nParameter validation failed:\r\nInvalid type for parameter Evaluations[0].ComplianceType, value: [{'ComplianceType': 'COMPLIANT', 'Annotation': ' MFA detected'}], type: <class 'list'>, valid types: <class 'str'>: ParamValidationError\r\n\r\nWe narrowed down the cause of this error to these lines in rule_util.py:\r\n\r\n\r\n```\r\n        configurationItem = get_configuration_item(invokingEvent)\r\n\r\n        if configurationItem is None:\r\n            compliance = lambda_handler(event, context)\r\n\r\n            if isinstance(compliance, list):\r\n                for evaluation in compliance:\r\n                    missing_fields = False\r\n\r\n```\r\n\r\nThe value returned from lambda_handler is compared to be a list only if configurationItem is None.\r\nVersion-runtime : rdk-0.3.7-py3.6\r\n"},"comment":{"url":"https://api.github.com/repos/awslabs/aws-config-rdk/issues/comments/372094224","html_url":"https://github.com/awslabs/aws-config-rdk/issues/27#issuecomment-372094224","issue_url":"https://api.github.com/repos/awslabs/aws-config-rdk/issues/27","id":372094224,"user":{"login":"michaelborchert","id":1198287,"avatar_url":"https://avatars3.githubusercontent.com/u/1198287?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelborchert","html_url":"https://github.com/michaelborchert","followers_url":"https://api.github.com/users/michaelborchert/followers","following_url":"https://api.github.com/users/michaelborchert/following{/other_user}","gists_url":"https://api.github.com/users/michaelborchert/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelborchert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelborchert/subscriptions","organizations_url":"https://api.github.com/users/michaelborchert/orgs","repos_url":"https://api.github.com/users/michaelborchert/repos","events_url":"https://api.github.com/users/michaelborchert/events{/privacy}","received_events_url":"https://api.github.com/users/michaelborchert/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T07:00:44Z","updated_at":"2018-03-11T07:00:44Z","author_association":"CONTRIBUTOR","body":"This should be addressed now in the latest version for both Python runtimes and Node."}}
{"actor":{"display_login":"michaelborchert"}}