We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't access requester pays buckets with `rio --aws-requester-pays info <url>` cli tool
## Expected behavior and actual behavior.

Should be able to run something like this if correct AWS credentials are available

```bash
rio --aws-requester-pays \
  info \
 s3://usgs-landsat/collection02/level-2/standard/oli-tirs/2014/168/061/LC08_L2SP_168061_20140102_20200912_02_T1/LC08_L2SP_168061_20140102_20200912_02_T1_SR_B4.TIF

{"blockxsize": 256, "blockysize": 256, "bounds": [172185.0, -276315.0, 399915.0, -44085.0], "colorinterp": ["gray"], "compress": "deflate", "count": 1, "crs": "EPSG:32637", "descriptions": [null], "driver": "GTiff", "dtype": "uint16", "height": 7741, "indexes": [1], "interleave": "band", "lnglat": [37.07703791017367, -1.4485551824205734], "mask_flags": [["nodata"]], "nodata": 0.0, "res": [30.0, 30.0], "shape": [7741, 7591], "tiled": true, "transform": [30.0, 0.0, 172185.0, 0.0, -30.0, -44085.0, 0.0, 0.0, 1.0], "units": [null], "width": 7591}
```

## Steps to reproduce the problem.

1. make sure you have correct credentials, command below should work

```bash
gdalinfo /vsis3/usgs-landsat/collection02/level-2/standard/oli-tirs/2014/168/061/LC08_L2SP_168061_20140102_20200912_02_T1/LC08_L2SP_168061_20140102_20200912_02_T1_SR_B4.TIF \
--config AWS_REQUEST_PAYER requester
```
2. Now access same file with `rio`

```bash
rio --aws-requester-pays \
  info \
 s3://usgs-landsat/collection02/level-2/standard/oli-tirs/2014/168/061/LC08_L2SP_168061_20140102_20200912_02_T1/LC08_L2SP_168061_20140102_20200912_02_T1_SR_B4.TIF
```
and get output similar to

```
Traceback (most recent call last):
  File "rasterio/_base.pyx", line 216, in rasterio._base.DatasetBase.__init__
  File "rasterio/_shim.pyx", line 78, in rasterio._shim.open_dataset
  File "rasterio/_err.pyx", line 213, in rasterio._err.exc_wrap_pointer
rasterio._err.CPLE_AWSAccessDeniedError: Access Denied
```


## Diagnosis

Problem is here:

https://github.com/mapbox/rasterio/blob/2e8ec36a52b6d57e5364f1b415e3573f6e3084a3/rasterio/rio/main.py#L95-L101

basically AWSSession is not being constructed even if aws option was requested.

Should be this instead:

```diff
-    if aws_profile or aws_no_sign_requests:
+    if aws_profile or aws_no_sign_requests or aws_requester_pays:
```

## Operating system

Ubuntu 20.04

## Rasterio version and provenance

1.1.8 compiled against local gdal 3.0.4


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `rasterio/rio/main.py`
Content:
```
1 """
2 Main command group for Rasterio's CLI.
3 
4 Subcommands developed as a part of the Rasterio package have their own
5 modules under ``rasterio.rio`` (like ``rasterio/rio/info.py``) and are
6 registered in the 'rasterio.rio_commands' entry point group in
7 Rasterio's ``setup.py``:
8 
9     entry_points='''
10         [console_scripts]
11         rio=rasterio.rio.main:main_group
12 
13         [rasterio.rio_commands]
14         bounds=rasterio.rio.bounds:bounds
15         calc=rasterio.rio.calc:calc
16         ...
17 
18 Users may create their own ``rio`` subcommands by writing modules that
19 register entry points in Rasterio's 'rasterio.rio_plugins' group. See
20 for example https://github.com/sgillies/rio-plugin-example, which has
21 been published to PyPI as ``rio-metasay``.
22 
23 There's no advantage to making a ``rio`` subcommand which doesn't
24 import rasterio. But if you are using rasterio, you may profit from
25 Rasterio's CLI infrastructure and the network of existing commands.
26 Please add yours to the registry
27 
28   https://github.com/mapbox/rasterio/wiki/Rio-plugin-registry
29 
30 so that other ``rio`` users may find it.
31 """
32 
33 
34 import logging
35 from pkg_resources import iter_entry_points
36 import sys
37 
38 from click_plugins import with_plugins
39 import click
40 import cligj
41 
42 from . import options
43 import rasterio
44 from rasterio.session import AWSSession
45 
46 
47 def configure_logging(verbosity):
48     log_level = max(10, 30 - 10 * verbosity)
49     logging.basicConfig(stream=sys.stderr, level=log_level)
50 
51 
52 def gdal_version_cb(ctx, param, value):
53     if not value or ctx.resilient_parsing:
54         return
55 
56     click.echo("{0}".format(rasterio.__gdal_version__), color=ctx.color)
57     ctx.exit()
58 
59 
60 @with_plugins(
61     ep
62     for ep in list(iter_entry_points("rasterio.rio_commands"))
63     + list(iter_entry_points("rasterio.rio_plugins"))
64 )
65 @click.group()
66 @cligj.verbose_opt
67 @cligj.quiet_opt
68 @click.option(
69     "--aws-profile", help="Select a profile from the AWS credentials file"
70 )
71 @click.option("--aws-no-sign-requests", is_flag=True, help="Make requests anonymously")
72 @click.option(
73     "--aws-requester-pays", is_flag=True, help="Requester pays data transfer costs"
74 )
75 @click.version_option(version=rasterio.__version__, message="%(version)s")
76 @click.option("--gdal-version", is_eager=True, is_flag=True, callback=gdal_version_cb)
77 @click.pass_context
78 def main_group(
79     ctx,
80     verbose,
81     quiet,
82     aws_profile,
83     aws_no_sign_requests,
84     aws_requester_pays,
85     gdal_version,
86 ):
87     """Rasterio command line interface.
88     """
89     verbosity = verbose - quiet
90     configure_logging(verbosity)
91     ctx.obj = {}
92     ctx.obj["verbosity"] = verbosity
93     ctx.obj["aws_profile"] = aws_profile
94     envopts = {"CPL_DEBUG": (verbosity > 2)}
95     if aws_profile or aws_no_sign_requests:
96         ctx.obj["env"] = rasterio.Env(
97             session=AWSSession(
98                 profile_name=aws_profile,
99                 aws_unsigned=aws_no_sign_requests,
100                 requester_pays=aws_requester_pays,
101             ), **envopts)
102     else:
103         ctx.obj["env"] = rasterio.Env(**envopts)
104
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/rasterio/rio/main.py b/rasterio/rio/main.py
--- a/rasterio/rio/main.py
+++ b/rasterio/rio/main.py
@@ -92,7 +92,7 @@
     ctx.obj["verbosity"] = verbosity
     ctx.obj["aws_profile"] = aws_profile
     envopts = {"CPL_DEBUG": (verbosity > 2)}
-    if aws_profile or aws_no_sign_requests:
+    if aws_profile or aws_no_sign_requests or aws_requester_pays:
         ctx.obj["env"] = rasterio.Env(
             session=AWSSession(
                 profile_name=aws_profile,

{"golden_diff": "diff --git a/rasterio/rio/main.py b/rasterio/rio/main.py\n--- a/rasterio/rio/main.py\n+++ b/rasterio/rio/main.py\n@@ -92,7 +92,7 @@\n     ctx.obj[\"verbosity\"] = verbosity\n     ctx.obj[\"aws_profile\"] = aws_profile\n     envopts = {\"CPL_DEBUG\": (verbosity > 2)}\n-    if aws_profile or aws_no_sign_requests:\n+    if aws_profile or aws_no_sign_requests or aws_requester_pays:\n         ctx.obj[\"env\"] = rasterio.Env(\n             session=AWSSession(\n                 profile_name=aws_profile,\n", "issue": "Can't access requester pays buckets with `rio --aws-requester-pays info <url>` cli tool\n## Expected behavior and actual behavior.\r\n\r\nShould be able to run something like this if correct AWS credentials are available\r\n\r\n```bash\r\nrio --aws-requester-pays \\\r\n  info \\\r\n s3://usgs-landsat/collection02/level-2/standard/oli-tirs/2014/168/061/LC08_L2SP_168061_20140102_20200912_02_T1/LC08_L2SP_168061_20140102_20200912_02_T1_SR_B4.TIF\r\n\r\n{\"blockxsize\": 256, \"blockysize\": 256, \"bounds\": [172185.0, -276315.0, 399915.0, -44085.0], \"colorinterp\": [\"gray\"], \"compress\": \"deflate\", \"count\": 1, \"crs\": \"EPSG:32637\", \"descriptions\": [null], \"driver\": \"GTiff\", \"dtype\": \"uint16\", \"height\": 7741, \"indexes\": [1], \"interleave\": \"band\", \"lnglat\": [37.07703791017367, -1.4485551824205734], \"mask_flags\": [[\"nodata\"]], \"nodata\": 0.0, \"res\": [30.0, 30.0], \"shape\": [7741, 7591], \"tiled\": true, \"transform\": [30.0, 0.0, 172185.0, 0.0, -30.0, -44085.0, 0.0, 0.0, 1.0], \"units\": [null], \"width\": 7591}\r\n```\r\n\r\n## Steps to reproduce the problem.\r\n\r\n1. make sure you have correct credentials, command below should work\r\n\r\n```bash\r\ngdalinfo /vsis3/usgs-landsat/collection02/level-2/standard/oli-tirs/2014/168/061/LC08_L2SP_168061_20140102_20200912_02_T1/LC08_L2SP_168061_20140102_20200912_02_T1_SR_B4.TIF \\\r\n--config AWS_REQUEST_PAYER requester\r\n```\r\n2. Now access same file with `rio`\r\n\r\n```bash\r\nrio --aws-requester-pays \\\r\n  info \\\r\n s3://usgs-landsat/collection02/level-2/standard/oli-tirs/2014/168/061/LC08_L2SP_168061_20140102_20200912_02_T1/LC08_L2SP_168061_20140102_20200912_02_T1_SR_B4.TIF\r\n```\r\nand get output similar to\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"rasterio/_base.pyx\", line 216, in rasterio._base.DatasetBase.__init__\r\n  File \"rasterio/_shim.pyx\", line 78, in rasterio._shim.open_dataset\r\n  File \"rasterio/_err.pyx\", line 213, in rasterio._err.exc_wrap_pointer\r\nrasterio._err.CPLE_AWSAccessDeniedError: Access Denied\r\n```\r\n\r\n\r\n## Diagnosis\r\n\r\nProblem is here:\r\n\r\nhttps://github.com/mapbox/rasterio/blob/2e8ec36a52b6d57e5364f1b415e3573f6e3084a3/rasterio/rio/main.py#L95-L101\r\n\r\nbasically AWSSession is not being constructed even if aws option was requested.\r\n\r\nShould be this instead:\r\n\r\n```diff\r\n-    if aws_profile or aws_no_sign_requests:\r\n+    if aws_profile or aws_no_sign_requests or aws_requester_pays:\r\n```\r\n\r\n## Operating system\r\n\r\nUbuntu 20.04\r\n\r\n## Rasterio version and provenance\r\n\r\n1.1.8 compiled against local gdal 3.0.4\r\n\n", "before_files": [{"content": "\"\"\"\nMain command group for Rasterio's CLI.\n\nSubcommands developed as a part of the Rasterio package have their own\nmodules under ``rasterio.rio`` (like ``rasterio/rio/info.py``) and are\nregistered in the 'rasterio.rio_commands' entry point group in\nRasterio's ``setup.py``:\n\n    entry_points='''\n        [console_scripts]\n        rio=rasterio.rio.main:main_group\n\n        [rasterio.rio_commands]\n        bounds=rasterio.rio.bounds:bounds\n        calc=rasterio.rio.calc:calc\n        ...\n\nUsers may create their own ``rio`` subcommands by writing modules that\nregister entry points in Rasterio's 'rasterio.rio_plugins' group. See\nfor example https://github.com/sgillies/rio-plugin-example, which has\nbeen published to PyPI as ``rio-metasay``.\n\nThere's no advantage to making a ``rio`` subcommand which doesn't\nimport rasterio. But if you are using rasterio, you may profit from\nRasterio's CLI infrastructure and the network of existing commands.\nPlease add yours to the registry\n\n  https://github.com/mapbox/rasterio/wiki/Rio-plugin-registry\n\nso that other ``rio`` users may find it.\n\"\"\"\n\n\nimport logging\nfrom pkg_resources import iter_entry_points\nimport sys\n\nfrom click_plugins import with_plugins\nimport click\nimport cligj\n\nfrom . import options\nimport rasterio\nfrom rasterio.session import AWSSession\n\n\ndef configure_logging(verbosity):\n    log_level = max(10, 30 - 10 * verbosity)\n    logging.basicConfig(stream=sys.stderr, level=log_level)\n\n\ndef gdal_version_cb(ctx, param, value):\n    if not value or ctx.resilient_parsing:\n        return\n\n    click.echo(\"{0}\".format(rasterio.__gdal_version__), color=ctx.color)\n    ctx.exit()\n\n\n@with_plugins(\n    ep\n    for ep in list(iter_entry_points(\"rasterio.rio_commands\"))\n    + list(iter_entry_points(\"rasterio.rio_plugins\"))\n)\n@click.group()\n@cligj.verbose_opt\n@cligj.quiet_opt\n@click.option(\n    \"--aws-profile\", help=\"Select a profile from the AWS credentials file\"\n)\n@click.option(\"--aws-no-sign-requests\", is_flag=True, help=\"Make requests anonymously\")\n@click.option(\n    \"--aws-requester-pays\", is_flag=True, help=\"Requester pays data transfer costs\"\n)\n@click.version_option(version=rasterio.__version__, message=\"%(version)s\")\n@click.option(\"--gdal-version\", is_eager=True, is_flag=True, callback=gdal_version_cb)\n@click.pass_context\ndef main_group(\n    ctx,\n    verbose,\n    quiet,\n    aws_profile,\n    aws_no_sign_requests,\n    aws_requester_pays,\n    gdal_version,\n):\n    \"\"\"Rasterio command line interface.\n    \"\"\"\n    verbosity = verbose - quiet\n    configure_logging(verbosity)\n    ctx.obj = {}\n    ctx.obj[\"verbosity\"] = verbosity\n    ctx.obj[\"aws_profile\"] = aws_profile\n    envopts = {\"CPL_DEBUG\": (verbosity > 2)}\n    if aws_profile or aws_no_sign_requests:\n        ctx.obj[\"env\"] = rasterio.Env(\n            session=AWSSession(\n                profile_name=aws_profile,\n                aws_unsigned=aws_no_sign_requests,\n                requester_pays=aws_requester_pays,\n            ), **envopts)\n    else:\n        ctx.obj[\"env\"] = rasterio.Env(**envopts)\n", "path": "rasterio/rio/main.py"}], "after_files": [{"content": "\"\"\"\nMain command group for Rasterio's CLI.\n\nSubcommands developed as a part of the Rasterio package have their own\nmodules under ``rasterio.rio`` (like ``rasterio/rio/info.py``) and are\nregistered in the 'rasterio.rio_commands' entry point group in\nRasterio's ``setup.py``:\n\n    entry_points='''\n        [console_scripts]\n        rio=rasterio.rio.main:main_group\n\n        [rasterio.rio_commands]\n        bounds=rasterio.rio.bounds:bounds\n        calc=rasterio.rio.calc:calc\n        ...\n\nUsers may create their own ``rio`` subcommands by writing modules that\nregister entry points in Rasterio's 'rasterio.rio_plugins' group. See\nfor example https://github.com/sgillies/rio-plugin-example, which has\nbeen published to PyPI as ``rio-metasay``.\n\nThere's no advantage to making a ``rio`` subcommand which doesn't\nimport rasterio. But if you are using rasterio, you may profit from\nRasterio's CLI infrastructure and the network of existing commands.\nPlease add yours to the registry\n\n  https://github.com/mapbox/rasterio/wiki/Rio-plugin-registry\n\nso that other ``rio`` users may find it.\n\"\"\"\n\n\nimport logging\nfrom pkg_resources import iter_entry_points\nimport sys\n\nfrom click_plugins import with_plugins\nimport click\nimport cligj\n\nfrom . import options\nimport rasterio\nfrom rasterio.session import AWSSession\n\n\ndef configure_logging(verbosity):\n    log_level = max(10, 30 - 10 * verbosity)\n    logging.basicConfig(stream=sys.stderr, level=log_level)\n\n\ndef gdal_version_cb(ctx, param, value):\n    if not value or ctx.resilient_parsing:\n        return\n\n    click.echo(\"{0}\".format(rasterio.__gdal_version__), color=ctx.color)\n    ctx.exit()\n\n\n@with_plugins(\n    ep\n    for ep in list(iter_entry_points(\"rasterio.rio_commands\"))\n    + list(iter_entry_points(\"rasterio.rio_plugins\"))\n)\n@click.group()\n@cligj.verbose_opt\n@cligj.quiet_opt\n@click.option(\n    \"--aws-profile\", help=\"Select a profile from the AWS credentials file\"\n)\n@click.option(\"--aws-no-sign-requests\", is_flag=True, help=\"Make requests anonymously\")\n@click.option(\n    \"--aws-requester-pays\", is_flag=True, help=\"Requester pays data transfer costs\"\n)\n@click.version_option(version=rasterio.__version__, message=\"%(version)s\")\n@click.option(\"--gdal-version\", is_eager=True, is_flag=True, callback=gdal_version_cb)\n@click.pass_context\ndef main_group(\n    ctx,\n    verbose,\n    quiet,\n    aws_profile,\n    aws_no_sign_requests,\n    aws_requester_pays,\n    gdal_version,\n):\n    \"\"\"Rasterio command line interface.\n    \"\"\"\n    verbosity = verbose - quiet\n    configure_logging(verbosity)\n    ctx.obj = {}\n    ctx.obj[\"verbosity\"] = verbosity\n    ctx.obj[\"aws_profile\"] = aws_profile\n    envopts = {\"CPL_DEBUG\": (verbosity > 2)}\n    if aws_profile or aws_no_sign_requests or aws_requester_pays:\n        ctx.obj[\"env\"] = rasterio.Env(\n            session=AWSSession(\n                profile_name=aws_profile,\n                aws_unsigned=aws_no_sign_requests,\n                requester_pays=aws_requester_pays,\n            ), **envopts)\n    else:\n        ctx.obj[\"env\"] = rasterio.Env(**envopts)\n", "path": "rasterio/rio/main.py"}]}