<!--

Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)

If you need to include code snippets or logs, please put them in fenced code
blocks.  If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>

Please delete these comment blocks before submitting the issue.

-->

<!--

IMPORTANT!!!

PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!

PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!

Please complete the next sections or the issue will be closed.
These questions are the first thing we need to know to understand the context.

-->

**Apache Airflow version**:  v2.0.0b3


**Kubernetes version (if you are using kubernetes)** (use `kubectl version`): 1.16.15

**Environment**:

- **Cloud provider or hardware configuration**: AWS
- **OS** (e.g. from /etc/os-release):
- **Kernel** (e.g. `uname -a`):
- **Install tools**: Custom Helm Chart
- **Others**:

**What happened**:

S3 Remote Logging not working. Below is the stacktrace:
```
 Running <TaskInstance: canary_dag.print_date 2020-12-09T19:46:17.200838+00:00 [queued]> on host canarydagprintdate-9fafada4409d4eafb5e6e9c7187810ae                                                                                                                          │
│ [2020-12-09 19:54:09,825] {s3_task_handler.py:183} ERROR - Could not verify previous log to append: 'NoneType' object is not callable                                                                                                                                        │
│ Traceback (most recent call last):                                                                                                                                                                                                                                           │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/amazon/aws/log/s3_task_handler.py", line 179, in s3_write                                                                                                                                         │
│     if append and self.s3_log_exists(remote_log_location):                                                                                                                                                                                                                   │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/amazon/aws/log/s3_task_handler.py", line 141, in s3_log_exists                                                                                                                                    │
│     return self.hook.check_for_key(remote_log_location)                                                                                                                                                                                                                      │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/amazon/aws/hooks/s3.py", line 57, in wrapper                                                                                                                                                      │
│     connection = self.get_connection(self.aws_conn_id)                                                                                                                                                                                                                       │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/hooks/base.py", line 63, in get_connection                                                                                                                                                                  │
│     conn = Connection.get_connection_from_secrets(conn_id)                                                                                                                                                                                                                   │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/models/connection.py", line 351, in get_connection_from_secrets                                                                                                                                             │
│     conn = secrets_backend.get_connection(conn_id=conn_id)                                                                                                                                                                                                                   │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/session.py", line 64, in wrapper                                                                                                                                                                      │
│     with create_session() as session:                                                                                                                                                                                                                                        │
│   File "/usr/local/lib/python3.7/contextlib.py", line 112, in __enter__                                                                                                                                                                                                      │
│     return next(self.gen)                                                                                                                                                                                                                                                    │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/session.py", line 29, in create_session                                                                                                                                                               │
│     session = settings.Session()                                                                                                                                                                                                                                             │
│ TypeError: 'NoneType' object is not callable                                                                                                                                                                                                                                 │
│ [2020-12-09 19:54:09,826] {s3_task_handler.py:193} ERROR - Could not write logs to s3://my-favorite-airflow-logs/canary_dag/print_date/2020-12-09T19:46:17.200838+00:00/2.log                                                                                                   │
│ Traceback (most recent call last):                                                                                                                                                                                                                                           │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/amazon/aws/log/s3_task_handler.py", line 190, in s3_write                                                                                                                                         │
│     encrypt=conf.getboolean('logging', 'ENCRYPT_S3_LOGS'),                                                                                                                                                                                                                   │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/amazon/aws/hooks/s3.py", line 57, in wrapper                                                                                                                                                      │
│     connection = self.get_connection(self.aws_conn_id)                                                                                                                                                                                                                       │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/hooks/base.py", line 63, in get_connection                                                                                                                                                                  │
│     conn = Connection.get_connection_from_secrets(conn_id)                                                                                                                                                                                                                   │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/models/connection.py", line 351, in get_connection_from_secrets                                                                                                                                             │
│     conn = secrets_backend.get_connection(conn_id=conn_id)                                                                                                                                                                                                                   │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/session.py", line 64, in wrapper                                                                                                                                                                      │
│     with create_session() as session:                                                                                                                                                                                                                                        │
│   File "/usr/local/lib/python3.7/contextlib.py", line 112, in __enter__                                                                                                                                                                                                      │
│     return next(self.gen)                                                                                                                                                                                                                                                    │
│   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/session.py", line 29, in create_session                                                                                                                                                               │
│     session = settings.Session()                                                                                                                                                                                                                                             │
│ TypeError: 'NoneType' object is not callable                                                                                                                                                                                                                                 
 stream closed
```

**What you expected to happen**
Able to see the task instance logs in the airflow UI being read from S3 remote location.

**How to reproduce it**:

Pulled the latest master and created an airflow image from the dockerfile mentioned in the repo.

airflow/executors/celery_executor.py
"Adopted tasks were still pending after %s, assuming they never made it to celery and "
                "clearing:\n\t%s",
                self.task_adoption_timeout,
                "\n\t".join([repr(x) for x in timedout_keys]),
            )
            for key in timedout_keys:
                self.event_buffer[key] = (State.FAILED, None)
                del self.tasks[key]
                del self.adopted_task_timeouts[key]
    def debug_dump(self) -> None:
        """Called in response to SIGUSR2 by the scheduler"""
        super().debug_dump()
        self.log.info(
            "executor.tasks (%d)\n\t%s", len(self.tasks), "\n\t".join(map(repr, self.tasks.items()))
        )
        self.log.info(
            "executor.adopted_task_timeouts (%d)\n\t%s",
            len(self.adopted_task_timeouts),
            "\n\t".join(map(repr, self.adopted_task_timeouts.items())),
        )
    def update_all_task_states(self) -> None:
        """Updates states of the tasks."""
        self.log.debug("Inquiring about %s celery task(s)", len(self.tasks))
        state_and_info_by_celery_task_id = self.bulk_state_fetcher.get_many(self.tasks.values())
        self.log.debug("Inquiries completed.")
        for key, async_result in list(self.tasks.items()):
            state, info = state_and_info_by_celery_task_id.get(async_result.task_id)
            if state:
                self.update_task_state(key, state, info)
    def change_state(self, key: TaskInstanceKey, state: str, info=None) -> None: