Skip to content

Commit

Permalink
Merge branch 'release-1.17.24'
Browse files Browse the repository at this point in the history
* release-1.17.24:
  Bumping version to 1.17.24
  Add changelog entries from botocore
  Add info about proxies_config settings (#2771)
  Fix another backticks in Credentials guide
  Adding all exceptions
  • Loading branch information
aws-sdk-python-automation committed Mar 9, 2021
2 parents d46932d + a11df2d commit 1ffd568
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 9 deletions.
27 changes: 27 additions & 0 deletions .changes/1.17.24.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"category": "``rds``",
"description": "[``botocore``] Update rds client to latest version",
"type": "api-change"
},
{
"category": "``codeguruprofiler``",
"description": "[``botocore``] Update codeguruprofiler client to latest version",
"type": "api-change"
},
{
"category": "``autoscaling``",
"description": "[``botocore``] Update autoscaling client to latest version",
"type": "api-change"
},
{
"category": "``iotwireless``",
"description": "[``botocore``] Update iotwireless client to latest version",
"type": "api-change"
},
{
"category": "``efs``",
"description": "[``botocore``] Update efs client to latest version",
"type": "api-change"
}
]
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
CHANGELOG
=========

1.17.24
=======

* api-change:``rds``: [``botocore``] Update rds client to latest version
* api-change:``codeguruprofiler``: [``botocore``] Update codeguruprofiler client to latest version
* api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version
* api-change:``iotwireless``: [``botocore``] Update iotwireless client to latest version
* api-change:``efs``: [``botocore``] Update efs client to latest version


1.17.23
=======

Expand Down
2 changes: 1 addition & 1 deletion boto3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


__author__ = 'Amazon Web Services'
__version__ = '1.17.23'
__version__ = '1.17.24'


# The default Boto3 session; autoloaded when needed.
Expand Down
80 changes: 75 additions & 5 deletions docs/source/guide/configuration.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _guide_configuration:

Configuration
===========
=============

Overview
---------
Expand All @@ -19,12 +19,14 @@ For details about credential configuration, see the :ref:`guide_credentials` gui


Using the Config object
-------------------------
-----------------------
This option is for configuring client-specific configurations that affect the behavior of your specific client object only. As described earlier, there are options used here that will supersede those found in other configuration locations:

* ``region_name`` (string) - The AWS Region used in instantiating the client. If used, this takes precedence over environment variable and configuration file values. But it doesn't overwrite a ``region_name`` value *explicitly* passed to individual service methods.
* ``signature_version`` (string) - The signature version used when signing requests. Note that the default version is Signature Version 4. If you're using a presigned URL with an expiry of greater than 7 days, you should specify Signature Version 2.
* ``s3`` (related configurations; dictionary) - Amazon S3 service-specific configurations. For more information, see the `Config reference <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html>`_.
* ``s3`` (related configurations; dictionary) - Amazon S3 service-specific configurations. For more information, see the `Botocore config reference <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html>`_.
* ``proxies`` (dictionary) - Each entry maps a protocol name to the proxy server Boto3 should use to communicate using that protocol. See :ref:`specify_proxies` for more information.
* ``proxies_config`` (dictionary) - Additional proxy configuration settings. For more information, see :ref:`configure_proxies`.
* ``retries`` (dictionary) - Client retry behavior configuration options that include retry mode and maximum retry attempts. For more information, see the :ref:`guide_retries` guide.


Expand All @@ -48,9 +50,77 @@ To set these configuration options, create a ``Config`` object with the options
client = boto3.client('kinesis', config=my_config)
Using proxies
~~~~~~~~~~~~~
With Boto3, you can use proxies as intermediaries between your code and AWS. Proxies can provide functions such as filtering, security, firewalls, and privacy assurance.

.. _specify_proxies:

Specifying proxy servers
''''''''''''''''''''''''

You can specify proxy servers to be used for connections when using specific protocols. The ``proxies`` option in the ``Config`` object is a dictionary in which each entry maps a protocol to the address and port number of the proxy server for that protocol.

In the following example, a proxy list is set up to use ``proxy.amazon.com``, port 6502 as the proxy for all HTTP requests by default. HTTPS requests use port 2010 on ``proxy.amazon.org`` instead.


.. code-block:: python
import boto3
from botocore.config import Config
proxy_definitions = {
'http': 'http://proxy.amazon.com:6502',
'https': 'https://proxy.amazon.org:2010'
}
my_config = Config(
'region_name': 'us-east-2',
'signature_version': 'v4',
'proxies': proxy_definitions
}
client = boto3.client('kinesis', config=my_config)
.. _configure_proxies:
Configuring proxies
'''''''''''''''''''
You can configure how Boto3 uses proxies by specifying the ``proxies_config`` option, which is a dictionary that specifies the values of several proxy options by name. There are three keys in this dictionary: ``proxy_ca_bundle``, ``proxy_client_cert``, and ``proxy_use_forwarding_for_https``. For more information about these keys, see the `Botocore config reference <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config>`_.
.. code-block:: python
import boto3
from botocore.config import Config
proxy_definitions = {
'http': 'http://proxy.amazon.com:6502',
'https': 'https://proxy.amazon.org:2010'
}
my_config = Config(
'region_name': 'us-east-2',
'signature_version': 'v4',
'proxies': proxy_definitions,
'proxies_config': {
'proxy_client_cert': '/path/of/certificate'
}
}
client = boto3.client('kinesis', config=my_config)
With the addition of the ``proxies_config`` option shown here, the proxy will use the specified certificate file for authentication when using the HTTPS proxy.
Using environment variables
---------------------------
Configurations can be set through the use of system-wide environment variables. If set, these configurations are global and will affect all clients created unless explicitly overwritten through the use of a ``Config`` object.
You can set configuration settings using system-wide environment variables. These configurations are global and will affect all clients created unless you override them with a ``Config`` object.
.. note::
Only the configuration settings listed below can be set using environment variables.
``AWS_ACCESS_KEY_ID``
The access key for your AWS account.
Expand Down Expand Up @@ -132,7 +202,7 @@ Configurations can be set through the use of system-wide environment variables.
see the ``retry_mode`` configuration file section.
Using a configuration file
-------------------
--------------------------
Boto3 will also search the ``~/.aws/config`` file when looking for
configuration values. You can change the location of this file by
Expand Down
2 changes: 1 addition & 1 deletion docs/source/guide/credentials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Assume role provider

This is a different set of credentials configuration than using IAM roles for EC2 instances, which is discussed in a section below.

Within the ``~/.aws/config file``, you can also configure a profile to indicate that Boto3 should assume a role. When you do this, Boto3 will automatically make the corresponding AssumeRole calls to AWS STS on your behalf. It will handle in-memory caching as well as refreshing credentials as needed.
Within the ``~/.aws/config`` file, you can also configure a profile to indicate that Boto3 should assume a role. When you do this, Boto3 will automatically make the corresponding AssumeRole calls to AWS STS on your behalf. It will handle in-memory caching as well as refreshing credentials as needed.

You can specify the following configuration values for configuring an IAM role in Boto3. For more information about a particular setting, see the :ref:`guide_configuration` section.

Expand Down
4 changes: 4 additions & 0 deletions docs/source/guide/secrets-manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ Example
print("The request was invalid due to:", e)
elif e.response['Error']['Code'] == 'InvalidParameterException':
print("The request had invalid params:", e)
elif e.response['Error']['Code'] == 'DecryptionFailure':
print("The requested secret can't be decrypted using the provided KMS key:", e)
elif e.response['Error']['Code'] == 'InternalServiceError':
print("An error occurred on service side:", e)
else:
# Secrets Manager decrypts the secret value using the associated KMS CMK
# Depending on whether the secret was a string or binary, only one of these fields will be populated
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ universal = 1

[metadata]
requires_dist =
botocore>=1.20.23,<1.21.0
botocore>=1.20.24,<1.21.0
jmespath>=0.7.1,<1.0.0
s3transfer>=0.3.0,<0.4.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


requires = [
'botocore>=1.20.23,<1.21.0',
'botocore>=1.20.24,<1.21.0',
'jmespath>=0.7.1,<1.0.0',
's3transfer>=0.3.0,<0.4.0'
]
Expand Down

0 comments on commit 1ffd568

Please sign in to comment.