'alert when an IAM User has an active access key created more than 90 days go.'

def check_access_key_rotation(self, iamuser_item):

    akeys = iamuser_item.config.get('AccessKeys', {})
    for akey in akeys:
        if ('Status' in akey):
            if (akey['Status'] == 'Active'):
                create_date = akey['CreateDate']
                create_date = parser.parse(create_date)
                if (create_date < self.ninety_days_ago):
                    notes = '>    90    days    ago'
                    self.add_issue(1, 'Active    accesskey    has    not    been    rotated.', iamuser_item, notes=notes)
