Can I exit early from a task without executing the configured automatic retries in the task definition?

Set the status to FAILED_WITH_TERMINAL_ERROR in the TaskResult object within your worker. This would mark the task as FAILED and fail the workflow without retrying the task as a fail-fast mechanism.