awscli 1.40.31__py3-none-any.whl → 1.40.33__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- awscli/__init__.py +1 -1
- awscli/customizations/s3uploader.py +17 -7
- awscli/examples/cloudformation/_package_description.rst +4 -4
- {awscli-1.40.31.dist-info → awscli-1.40.33.dist-info}/METADATA +2 -2
- {awscli-1.40.31.dist-info → awscli-1.40.33.dist-info}/RECORD +13 -13
- {awscli-1.40.31.data → awscli-1.40.33.data}/scripts/aws +0 -0
- {awscli-1.40.31.data → awscli-1.40.33.data}/scripts/aws.cmd +0 -0
- {awscli-1.40.31.data → awscli-1.40.33.data}/scripts/aws_bash_completer +0 -0
- {awscli-1.40.31.data → awscli-1.40.33.data}/scripts/aws_completer +0 -0
- {awscli-1.40.31.data → awscli-1.40.33.data}/scripts/aws_zsh_completer.sh +0 -0
- {awscli-1.40.31.dist-info → awscli-1.40.33.dist-info}/LICENSE.txt +0 -0
- {awscli-1.40.31.dist-info → awscli-1.40.33.dist-info}/WHEEL +0 -0
- {awscli-1.40.31.dist-info → awscli-1.40.33.dist-info}/top_level.txt +0 -0
awscli/__init__.py
CHANGED
@@ -11,7 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
import hashlib
|
15
14
|
import logging
|
16
15
|
import threading
|
17
16
|
import os
|
@@ -19,6 +18,7 @@ import sys
|
|
19
18
|
|
20
19
|
import botocore
|
21
20
|
import botocore.exceptions
|
21
|
+
from botocore.compat import get_md5
|
22
22
|
from s3transfer.manager import TransferManager
|
23
23
|
from s3transfer.subscribers import BaseSubscriber
|
24
24
|
|
@@ -27,6 +27,16 @@ from awscli.compat import collections_abc
|
|
27
27
|
LOG = logging.getLogger(__name__)
|
28
28
|
|
29
29
|
|
30
|
+
def _get_checksum():
|
31
|
+
hashlib_params = {"usedforsecurity": False}
|
32
|
+
try:
|
33
|
+
checksum = get_md5(**hashlib_params)
|
34
|
+
except botocore.exceptions.MD5UnavailableError:
|
35
|
+
import hashlib
|
36
|
+
checksum = hashlib.sha256(**hashlib_params)
|
37
|
+
return checksum
|
38
|
+
|
39
|
+
|
30
40
|
class NoSuchBucketError(Exception):
|
31
41
|
def __init__(self, **kwargs):
|
32
42
|
msg = self.fmt.format(**kwargs)
|
@@ -128,7 +138,7 @@ class S3Uploader(object):
|
|
128
138
|
|
129
139
|
def upload_with_dedup(self, file_name, extension=None):
|
130
140
|
"""
|
131
|
-
Makes and returns name of the S3 object based on the file's
|
141
|
+
Makes and returns name of the S3 object based on the file's checksum
|
132
142
|
|
133
143
|
:param file_name: file to upload
|
134
144
|
:param extension: String of file extension to append to the object
|
@@ -140,8 +150,8 @@ class S3Uploader(object):
|
|
140
150
|
# and re-upload only if necessary. So the template points to same file
|
141
151
|
# in multiple places, this will upload only once
|
142
152
|
|
143
|
-
|
144
|
-
remote_path =
|
153
|
+
file_checksum = self.file_checksum(file_name)
|
154
|
+
remote_path = file_checksum
|
145
155
|
if extension:
|
146
156
|
remote_path = remote_path + "." + extension
|
147
157
|
|
@@ -172,7 +182,7 @@ class S3Uploader(object):
|
|
172
182
|
def file_checksum(self, file_name):
|
173
183
|
|
174
184
|
with open(file_name, "rb") as file_handle:
|
175
|
-
|
185
|
+
checksum = _get_checksum()
|
176
186
|
# Read file in chunks of 4096 bytes
|
177
187
|
block_size = 4096
|
178
188
|
|
@@ -182,13 +192,13 @@ class S3Uploader(object):
|
|
182
192
|
|
183
193
|
buf = file_handle.read(block_size)
|
184
194
|
while len(buf) > 0:
|
185
|
-
|
195
|
+
checksum.update(buf)
|
186
196
|
buf = file_handle.read(block_size)
|
187
197
|
|
188
198
|
# Restore file cursor's position
|
189
199
|
file_handle.seek(curpos)
|
190
200
|
|
191
|
-
return
|
201
|
+
return checksum.hexdigest()
|
192
202
|
|
193
203
|
def to_path_style_s3_url(self, key, version=None):
|
194
204
|
"""
|
@@ -49,8 +49,8 @@ current working directory. The exception is ``AWS::ApiGateway::RestApi``;
|
|
49
49
|
if you don't specify a ``BodyS3Location``, this command will not upload an artifact to S3.
|
50
50
|
|
51
51
|
Before the command uploads artifacts, it checks if the artifacts are already
|
52
|
-
present in the S3 bucket to prevent unnecessary uploads.
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
present in the S3 bucket to prevent unnecessary uploads. If the values match, the
|
53
|
+
command doesn't upload the artifacts. Use the ``--force-upload flag`` to skip this
|
54
|
+
check and always upload the artifacts. The command uses MD5 checksums to compare
|
55
|
+
files by default. If MD5 is not available in the environment, a SHA256 checksum is used.
|
56
56
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: awscli
|
3
|
-
Version: 1.40.
|
3
|
+
Version: 1.40.33
|
4
4
|
Summary: Universal Command Line Environment for AWS.
|
5
5
|
Home-page: http://aws.amazon.com/cli/
|
6
6
|
Author: Amazon Web Services
|
@@ -22,7 +22,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
23
23
|
Requires-Python: >= 3.9
|
24
24
|
License-File: LICENSE.txt
|
25
|
-
Requires-Dist: botocore (==1.38.
|
25
|
+
Requires-Dist: botocore (==1.38.34)
|
26
26
|
Requires-Dist: docutils (<=0.19,>=0.18.1)
|
27
27
|
Requires-Dist: s3transfer (<0.14.0,>=0.13.0)
|
28
28
|
Requires-Dist: PyYAML (<6.1,>=3.10)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
awscli/__init__.py,sha256=
|
1
|
+
awscli/__init__.py,sha256=tz4FdxncmUdB2yY5VyiaRD-2rqzqNgKEENhoI00HPNc,1534
|
2
2
|
awscli/__main__.py,sha256=iBjOg0tBxNlhzTi_tyc1G0SMGBvHMVvBJzX3JqYaooY,662
|
3
3
|
awscli/alias.py,sha256=Jj2jetpajUMcjqx9tFhHUOKpzLChQygnH2zqDFfmgIM,11315
|
4
4
|
awscli/argparser.py,sha256=3Pxx-vWytdV985Y6MIl9DeutUXyehIvACIs_PDby8GI,7650
|
@@ -66,7 +66,7 @@ awscli/customizations/removals.py,sha256=OK-nzQa2HcufHRG5E4XYfyFxuJQdQczlu5y8KkT
|
|
66
66
|
awscli/customizations/route53.py,sha256=TyEnjZz7bPegLQ23X5r1tNUJ1gSAmGeQBaF98t5PLmU,1187
|
67
67
|
awscli/customizations/s3errormsg.py,sha256=STKQ3714dnXOzPSPszCikhv5hoRBUJnk-u0kFp7FaEU,2480
|
68
68
|
awscli/customizations/s3events.py,sha256=ZcNmDN26dXxLrLawawl9jRFWqK1lMEQpty0YRNjBQws,4795
|
69
|
-
awscli/customizations/s3uploader.py,sha256=
|
69
|
+
awscli/customizations/s3uploader.py,sha256=vRz9bBLPby5ZZzBZpkI_SeWezoOmLkmOPeQ9jHemVpU,8133
|
70
70
|
awscli/customizations/sagemaker.py,sha256=mlYPscN-aQgV6L8dRK62QolmY7_iDmtHLe6DyGjayD8,1014
|
71
71
|
awscli/customizations/scalarparse.py,sha256=LIcIwHLHzFR1vQboh58N3spPEcR9IF2Wk9f-wA-IXoA,3041
|
72
72
|
awscli/customizations/sessendemail.py,sha256=uWgx-f0ILiTGKyjoQcJWx8XoG-BIWUkWNBy-yXvYpTU,4459
|
@@ -739,7 +739,7 @@ awscli/examples/cloudcontrol/list-resource-requests.rst,sha256=4RDKnlLXblL7ZnzYS
|
|
739
739
|
awscli/examples/cloudcontrol/list-resources.rst,sha256=hOfny2L4EshkHMILYO9RFNZaL9c1-M82MWV_P0kNVB8,829
|
740
740
|
awscli/examples/cloudcontrol/update-resource.rst,sha256=xK_BwVa_HJmLFRiiC3n-4B-ATKQIcBMHg3KSgmi-Mso,966
|
741
741
|
awscli/examples/cloudformation/_deploy_description.rst,sha256=tKFsU-kBgkYWmZhsyD8dqzdI15X_NGcVkp8h5V_odZ0,392
|
742
|
-
awscli/examples/cloudformation/_package_description.rst,sha256=
|
742
|
+
awscli/examples/cloudformation/_package_description.rst,sha256=jhuwmVLF27KDHkr5IbCUhSZ9-OLBjKI7zb2nFY5Vlmg,3640
|
743
743
|
awscli/examples/cloudformation/activate-type.rst,sha256=lK7ABVXq9IjRunlNx6VhWDIJp53XiZSadgfbzuu6w08,676
|
744
744
|
awscli/examples/cloudformation/batch-describe-type-configurations.rst,sha256=ZL59dBVV7gFBhVWcwWAt0lFnvyimZljfoN1BJKpoRCk,1304
|
745
745
|
awscli/examples/cloudformation/cancel-update-stack.rst,sha256=iXh30epVbKsksPDXoHLeoFQ5JMksU12FH48oflQ3BYU,217
|
@@ -6129,13 +6129,13 @@ awscli/topics/return-codes.rst,sha256=d9lpNFZwD75IiYcDEADQzu-4QiR8P28UPHkrNwPV5J
|
|
6129
6129
|
awscli/topics/s3-config.rst,sha256=5EIVd4ggLBHtzjtHFvQp9hY415yMGZiG7S_rO9qy2t0,11663
|
6130
6130
|
awscli/topics/s3-faq.rst,sha256=9qO0HFI6F9hx1wVEUDl8Jy6yoCUd9zbtv-Z0Re4dsiw,2934
|
6131
6131
|
awscli/topics/topic-tags.json,sha256=6lUSrs3FKCZNRSQMnjcXNgWyRNGjZIeur1988a4IO5o,1577
|
6132
|
-
awscli-1.40.
|
6133
|
-
awscli-1.40.
|
6134
|
-
awscli-1.40.
|
6135
|
-
awscli-1.40.
|
6136
|
-
awscli-1.40.
|
6137
|
-
awscli-1.40.
|
6138
|
-
awscli-1.40.
|
6139
|
-
awscli-1.40.
|
6140
|
-
awscli-1.40.
|
6141
|
-
awscli-1.40.
|
6132
|
+
awscli-1.40.33.data/scripts/aws,sha256=r24FExgs0-JjILTQ3XZAqXBYE4SV6UMTtALkLGAj86g,805
|
6133
|
+
awscli-1.40.33.data/scripts/aws.cmd,sha256=s46DkC6LNgX63CIkzxxbPnFMJ6DRDBkvc88GnWa8Pvg,1432
|
6134
|
+
awscli-1.40.33.data/scripts/aws_bash_completer,sha256=RRpoEGJRagRzyHZKZZOwpltuVYv2EoiZsdXhmyWPZ54,204
|
6135
|
+
awscli-1.40.33.data/scripts/aws_completer,sha256=oC9kuMDlWE47dWk_4xjPde2PQvN-M0vND0J4YSLabVQ,1126
|
6136
|
+
awscli-1.40.33.data/scripts/aws_zsh_completer.sh,sha256=Qm6Z8ejNAMzpJjaT0pzqxbSDT2zxdmzVe5haRA7qLoc,1808
|
6137
|
+
awscli-1.40.33.dist-info/LICENSE.txt,sha256=o5XhFlwu0OK_BBrijlKCRa7dQAm36UrUB3gCV_cEr8E,549
|
6138
|
+
awscli-1.40.33.dist-info/METADATA,sha256=g_a-5YKPBN44gUI77xYhjilW9zkfpTNgQuQGMcD8uDQ,11055
|
6139
|
+
awscli-1.40.33.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
6140
|
+
awscli-1.40.33.dist-info/top_level.txt,sha256=vt9wXFr1_nGYK6abhJgt6zY3fULe4JSZedm_5XOM9S0,7
|
6141
|
+
awscli-1.40.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|