From 2781f998443c0b63480b7df24094d037540f7778 Mon Sep 17 00:00:00 2001 From: sweta Date: Wed, 7 Oct 2020 14:53:16 -0700 Subject: [PATCH 1/5] Adding all exceptions --- docs/source/guide/secrets-manager.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/guide/secrets-manager.rst b/docs/source/guide/secrets-manager.rst index 3025123338..b0d4239bda 100644 --- a/docs/source/guide/secrets-manager.rst +++ b/docs/source/guide/secrets-manager.rst @@ -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 From d8ad56b17b6adc62c0b5df2f786a1cc595715ee3 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Thu, 4 Mar 2021 20:45:19 +0500 Subject: [PATCH 2/5] Fix another backticks in Credentials guide --- docs/source/guide/credentials.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/guide/credentials.rst b/docs/source/guide/credentials.rst index 6e58760d3e..bb02b7bbf3 100644 --- a/docs/source/guide/credentials.rst +++ b/docs/source/guide/credentials.rst @@ -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. From a0bb87e68dd1f2565f28b393069e69f20355c3ec Mon Sep 17 00:00:00 2001 From: Eric Shepherd Date: Mon, 8 Mar 2021 15:46:18 -0500 Subject: [PATCH 3/5] Add info about proxies_config settings (#2771) * Add info about proxies_config settings Includes a new section about doing configuration. Also added some links, cleaned up a few bits of the RST, and other minor adjustments. --- docs/source/guide/configuration.rst | 80 +++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 5 deletions(-) diff --git a/docs/source/guide/configuration.rst b/docs/source/guide/configuration.rst index 174a5e654f..7ef4b718b4 100644 --- a/docs/source/guide/configuration.rst +++ b/docs/source/guide/configuration.rst @@ -1,7 +1,7 @@ .. _guide_configuration: Configuration -=========== +============= Overview --------- @@ -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 `_. +* ``s3`` (related configurations; dictionary) - Amazon S3 service-specific configurations. For more information, see the `Botocore config reference `_. +* ``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. @@ -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 `_. + +.. 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. @@ -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 From 1330912140b03d342d90f24c4f8cba2f6c37d25a Mon Sep 17 00:00:00 2001 From: aws-sdk-python-automation Date: Tue, 9 Mar 2021 19:45:17 +0000 Subject: [PATCH 4/5] Add changelog entries from botocore --- .changes/next-release/api-change-autoscaling-43224.json | 5 +++++ .changes/next-release/api-change-codeguruprofiler-83359.json | 5 +++++ .changes/next-release/api-change-efs-2488.json | 5 +++++ .changes/next-release/api-change-iotwireless-29692.json | 5 +++++ .changes/next-release/api-change-rds-61243.json | 5 +++++ 5 files changed, 25 insertions(+) create mode 100644 .changes/next-release/api-change-autoscaling-43224.json create mode 100644 .changes/next-release/api-change-codeguruprofiler-83359.json create mode 100644 .changes/next-release/api-change-efs-2488.json create mode 100644 .changes/next-release/api-change-iotwireless-29692.json create mode 100644 .changes/next-release/api-change-rds-61243.json diff --git a/.changes/next-release/api-change-autoscaling-43224.json b/.changes/next-release/api-change-autoscaling-43224.json new file mode 100644 index 0000000000..9f2d5e29c9 --- /dev/null +++ b/.changes/next-release/api-change-autoscaling-43224.json @@ -0,0 +1,5 @@ +{ + "category": "``autoscaling``", + "type": "api-change", + "description": "[``botocore``] Update autoscaling client to latest version" +} diff --git a/.changes/next-release/api-change-codeguruprofiler-83359.json b/.changes/next-release/api-change-codeguruprofiler-83359.json new file mode 100644 index 0000000000..05c58b0f33 --- /dev/null +++ b/.changes/next-release/api-change-codeguruprofiler-83359.json @@ -0,0 +1,5 @@ +{ + "category": "``codeguruprofiler``", + "type": "api-change", + "description": "[``botocore``] Update codeguruprofiler client to latest version" +} diff --git a/.changes/next-release/api-change-efs-2488.json b/.changes/next-release/api-change-efs-2488.json new file mode 100644 index 0000000000..909c98756f --- /dev/null +++ b/.changes/next-release/api-change-efs-2488.json @@ -0,0 +1,5 @@ +{ + "category": "``efs``", + "type": "api-change", + "description": "[``botocore``] Update efs client to latest version" +} diff --git a/.changes/next-release/api-change-iotwireless-29692.json b/.changes/next-release/api-change-iotwireless-29692.json new file mode 100644 index 0000000000..4605ec77ca --- /dev/null +++ b/.changes/next-release/api-change-iotwireless-29692.json @@ -0,0 +1,5 @@ +{ + "category": "``iotwireless``", + "type": "api-change", + "description": "[``botocore``] Update iotwireless client to latest version" +} diff --git a/.changes/next-release/api-change-rds-61243.json b/.changes/next-release/api-change-rds-61243.json new file mode 100644 index 0000000000..eb52680b11 --- /dev/null +++ b/.changes/next-release/api-change-rds-61243.json @@ -0,0 +1,5 @@ +{ + "category": "``rds``", + "type": "api-change", + "description": "[``botocore``] Update rds client to latest version" +} From a11df2dc5ae91317b03e80557d17d3dc1625af91 Mon Sep 17 00:00:00 2001 From: aws-sdk-python-automation Date: Tue, 9 Mar 2021 19:45:25 +0000 Subject: [PATCH 5/5] Bumping version to 1.17.24 --- .changes/1.17.24.json | 27 +++++++++++++++++++ .../api-change-autoscaling-43224.json | 5 ---- .../api-change-codeguruprofiler-83359.json | 5 ---- .../next-release/api-change-efs-2488.json | 5 ---- .../api-change-iotwireless-29692.json | 5 ---- .../next-release/api-change-rds-61243.json | 5 ---- CHANGELOG.rst | 10 +++++++ boto3/__init__.py | 2 +- setup.cfg | 2 +- setup.py | 2 +- 10 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 .changes/1.17.24.json delete mode 100644 .changes/next-release/api-change-autoscaling-43224.json delete mode 100644 .changes/next-release/api-change-codeguruprofiler-83359.json delete mode 100644 .changes/next-release/api-change-efs-2488.json delete mode 100644 .changes/next-release/api-change-iotwireless-29692.json delete mode 100644 .changes/next-release/api-change-rds-61243.json diff --git a/.changes/1.17.24.json b/.changes/1.17.24.json new file mode 100644 index 0000000000..14e8912004 --- /dev/null +++ b/.changes/1.17.24.json @@ -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" + } +] \ No newline at end of file diff --git a/.changes/next-release/api-change-autoscaling-43224.json b/.changes/next-release/api-change-autoscaling-43224.json deleted file mode 100644 index 9f2d5e29c9..0000000000 --- a/.changes/next-release/api-change-autoscaling-43224.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "category": "``autoscaling``", - "type": "api-change", - "description": "[``botocore``] Update autoscaling client to latest version" -} diff --git a/.changes/next-release/api-change-codeguruprofiler-83359.json b/.changes/next-release/api-change-codeguruprofiler-83359.json deleted file mode 100644 index 05c58b0f33..0000000000 --- a/.changes/next-release/api-change-codeguruprofiler-83359.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "category": "``codeguruprofiler``", - "type": "api-change", - "description": "[``botocore``] Update codeguruprofiler client to latest version" -} diff --git a/.changes/next-release/api-change-efs-2488.json b/.changes/next-release/api-change-efs-2488.json deleted file mode 100644 index 909c98756f..0000000000 --- a/.changes/next-release/api-change-efs-2488.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "category": "``efs``", - "type": "api-change", - "description": "[``botocore``] Update efs client to latest version" -} diff --git a/.changes/next-release/api-change-iotwireless-29692.json b/.changes/next-release/api-change-iotwireless-29692.json deleted file mode 100644 index 4605ec77ca..0000000000 --- a/.changes/next-release/api-change-iotwireless-29692.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "category": "``iotwireless``", - "type": "api-change", - "description": "[``botocore``] Update iotwireless client to latest version" -} diff --git a/.changes/next-release/api-change-rds-61243.json b/.changes/next-release/api-change-rds-61243.json deleted file mode 100644 index eb52680b11..0000000000 --- a/.changes/next-release/api-change-rds-61243.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "category": "``rds``", - "type": "api-change", - "description": "[``botocore``] Update rds client to latest version" -} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b9c226aa08..8318ba8c2a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 ======= diff --git a/boto3/__init__.py b/boto3/__init__.py index f0a6930079..e9ee2ee914 100644 --- a/boto3/__init__.py +++ b/boto3/__init__.py @@ -18,7 +18,7 @@ __author__ = 'Amazon Web Services' -__version__ = '1.17.23' +__version__ = '1.17.24' # The default Boto3 session; autoloaded when needed. diff --git a/setup.cfg b/setup.cfg index 0578bcf11e..03e20142b5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/setup.py b/setup.py index da5168eca9..0ff7202119 100644 --- a/setup.py +++ b/setup.py @@ -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' ]