def validate_update_dyno()

in functions/source/new_account_handler.py [0:0]


def validate_update_dyno(content, table_name):
    '''Validate and update dyno table'''

    response = False

    for row in csv.DictReader(content.splitlines()):
        (validation, errormsg) = validateinput(row)
        try:
            response = DYNO.put_item(
                Item={
                    'AccountName': {'S': row['AccountName'], },
                    'SSOUserEmail': {'S': row['SSOUserEmail'], },
                    'AccountEmail': {'S': row['AccountEmail'], },
                    'SSOUserFirstName': {'S': row['SSOUserFirstName'], },
                    'SSOUserLastName': {'S': row['SSOUserLastName'], },
                    'OrgUnit': {'S': row['OrgUnit'], },
                    'Status': {'S': validation},
                    'AccountId': {'S': 'UNKNOWN'},
                    'Message': {'S': str(errormsg)}
                },
                TableName=table_name,
                )
        except ClientError as exe:
            LOGGER.error('Unable to update the table: %s', str(exe))

    return response