def valid_exception(error):
    """There are certain Exceptions raised that indicate successful authorization.
    This method will return True if one of those Exceptions is raised
    """
    VALID_EXCEPTIONS = [
        'DryRunOperation',
        # S3
        'NoSuchCORSConfiguration',
        'ServerSideEncryptionConfigurationNotFoundError',
        'NoSuchConfiguration',
        'NoSuchLifecycleConfiguration',
        'ReplicationConfigurationNotFoundError',
        'NoSuchTagSet',
        'NoSuchWebsiteConfiguration',
        'NoSuchKey',

        # EC2
        'InvalidTargetArn.Unknown',
    ]
    for exception in VALID_EXCEPTIONS:
        if exception in str(error):
            return True
    return False