Skip to content

Commit f2b4b67

Browse files
author
awstools
committed
feat(client-s3): Fix an issue where the SDK can fail to unmarshall response due to NumberFormatException
1 parent 76370a8 commit f2b4b67

35 files changed

+982
-873
lines changed

clients/client-s3/src/commands/CompleteMultipartUploadCommand.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ export interface CompleteMultipartUploadCommandOutput extends CompleteMultipartU
4646
* <p>Completes a multipart upload by assembling previously uploaded parts.</p>
4747
* <p>You first initiate the multipart upload and then upload all parts using the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a>
4848
* operation. After successfully uploading all relevant parts of an upload, you call this
49-
* action to complete the upload. Upon receiving this request, Amazon S3 concatenates all the
50-
* parts in ascending order by part number to create a new object. In the Complete Multipart
51-
* Upload request, you must provide the parts list. You must ensure that the parts list is
52-
* complete. This action concatenates the parts that you provide in the list. For each part in
53-
* the list, you must provide the part number and the <code>ETag</code> value, returned after
54-
* that part was uploaded.</p>
49+
* action to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts
50+
* in ascending order by part number to create a new object. In the Complete Multipart Upload
51+
* request, you must provide the parts list. You must ensure that the parts list is complete.
52+
* This action concatenates the parts that you provide in the list. For each part in the list,
53+
* you must provide the part number and the <code>ETag</code> value, returned after that part
54+
* was uploaded.</p>
5555
* <p>Processing of a Complete Multipart Upload request could take several minutes to
5656
* complete. After Amazon S3 begins processing the request, it sends an HTTP response header that
5757
* specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white

clients/client-s3/src/commands/CopyObjectCommand.ts

Lines changed: 90 additions & 76 deletions
Large diffs are not rendered by default.

clients/client-s3/src/commands/CreateBucketCommand.ts

Lines changed: 63 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -45,69 +45,95 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat
4545
* rules</a>.</p>
4646
* <p>If you want to create an Amazon S3 on Outposts bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html">Create Bucket</a>. </p>
4747
* <p>By default, the bucket is created in the US East (N. Virginia) Region. You can
48-
* optionally specify a Region in the request body. You might choose a Region to optimize
49-
* latency, minimize costs, or address regulatory requirements. For example, if you reside in
50-
* Europe, you will probably find it advantageous to create buckets in the Europe (Ireland)
51-
* Region. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro">Accessing a
48+
* optionally specify a Region in the request body. To constrain the bucket creation to a
49+
* specific Region, you can use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketConfiguration.html">
50+
* <code>LocationConstraint</code>
51+
* </a> condition key. You might choose a Region to
52+
* optimize latency, minimize costs, or address regulatory requirements. For example, if you
53+
* reside in Europe, you will probably find it advantageous to create buckets in the Europe
54+
* (Ireland) Region. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro">Accessing a
5255
* bucket</a>.</p>
5356
* <note>
5457
* <p>If you send your create bucket request to the <code>s3.amazonaws.com</code> endpoint,
55-
* the request goes to the <code>us-east-1</code> Region. Accordingly, the signature calculations in
56-
* Signature Version 4 must use <code>us-east-1</code> as the Region, even if the location constraint in
57-
* the request specifies another Region where the bucket is to be created. If you create a
58-
* bucket in a Region other than US East (N. Virginia), your application must be able to
59-
* handle 307 redirect. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html">Virtual hosting of
60-
* buckets</a>.</p>
58+
* the request goes to the <code>us-east-1</code> Region. Accordingly, the signature
59+
* calculations in Signature Version 4 must use <code>us-east-1</code> as the Region, even
60+
* if the location constraint in the request specifies another Region where the bucket is
61+
* to be created. If you create a bucket in a Region other than US East (N. Virginia), your
62+
* application must be able to handle 307 redirect. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html">Virtual hosting of
63+
* buckets</a>.</p>
6164
* </note>
6265
* <dl>
6366
* <dt>Permissions</dt>
6467
* <dd>
65-
* <p>In addition to <code>s3:CreateBucket</code>, the following permissions are required when
66-
* your <code>CreateBucket</code> request includes specific headers:</p>
68+
* <p>In addition to <code>s3:CreateBucket</code>, the following permissions are
69+
* required when your <code>CreateBucket</code> request includes specific
70+
* headers:</p>
6771
* <ul>
6872
* <li>
6973
* <p>
70-
* <b>Access control lists (ACLs)</b> - If your <code>CreateBucket</code> request
71-
* specifies access control list (ACL) permissions and the ACL is public-read, public-read-write,
72-
* authenticated-read, or if you specify access permissions explicitly through any other
73-
* ACL, both <code>s3:CreateBucket</code> and <code>s3:PutBucketAcl</code> permissions
74-
* are needed. If the ACL for the <code>CreateBucket</code> request is private or if the request doesn't
75-
* specify any ACLs, only <code>s3:CreateBucket</code> permission is needed. </p>
74+
* <b>Access control lists (ACLs)</b> - If your
75+
* <code>CreateBucket</code> request specifies access control list (ACL)
76+
* permissions and the ACL is public-read, public-read-write,
77+
* authenticated-read, or if you specify access permissions explicitly through
78+
* any other ACL, both <code>s3:CreateBucket</code> and
79+
* <code>s3:PutBucketAcl</code> permissions are needed. If the ACL for the
80+
* <code>CreateBucket</code> request is private or if the request doesn't
81+
* specify any ACLs, only <code>s3:CreateBucket</code> permission is needed.
82+
* </p>
7683
* </li>
7784
* <li>
7885
* <p>
79-
* <b>Object Lock</b> - If <code>ObjectLockEnabledForBucket</code> is set to true in your
80-
* <code>CreateBucket</code> request,
81-
* <code>s3:PutBucketObjectLockConfiguration</code> and
82-
* <code>s3:PutBucketVersioning</code> permissions are required.</p>
86+
* <b>Object Lock</b> - If
87+
* <code>ObjectLockEnabledForBucket</code> is set to true in your
88+
* <code>CreateBucket</code> request,
89+
* <code>s3:PutBucketObjectLockConfiguration</code> and
90+
* <code>s3:PutBucketVersioning</code> permissions are required.</p>
8391
* </li>
8492
* <li>
8593
* <p>
86-
* <b>S3 Object Ownership</b> - If your <code>CreateBucket</code> request includes the <code>x-amz-object-ownership</code> header, then the
87-
* <code>s3:PutBucketOwnershipControls</code> permission is required. By default, <code>ObjectOwnership</code> is set to <code>BucketOWnerEnforced</code> and ACLs are disabled. We recommend keeping
88-
* ACLs disabled, except in uncommon use cases where you must control access for each object individually. If you want to change the <code>ObjectOwnership</code> setting, you can use the
89-
* <code>x-amz-object-ownership</code> header in your <code>CreateBucket</code> request to set the <code>ObjectOwnership</code> setting of your choice.
90-
* For more information about S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling object
91-
* ownership </a> in the <i>Amazon S3 User Guide</i>.</p>
94+
* <b>S3 Object Ownership</b> - If your
95+
* <code>CreateBucket</code> request includes the
96+
* <code>x-amz-object-ownership</code> header, then the
97+
* <code>s3:PutBucketOwnershipControls</code> permission is required. By
98+
* default, <code>ObjectOwnership</code> is set to
99+
* <code>BucketOWnerEnforced</code> and ACLs are disabled. We recommend
100+
* keeping ACLs disabled, except in uncommon use cases where you must control
101+
* access for each object individually. If you want to change the
102+
* <code>ObjectOwnership</code> setting, you can use the
103+
* <code>x-amz-object-ownership</code> header in your
104+
* <code>CreateBucket</code> request to set the <code>ObjectOwnership</code>
105+
* setting of your choice. For more information about S3 Object Ownership, see
106+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
107+
* object ownership </a> in the
108+
* <i>Amazon S3 User Guide</i>.</p>
92109
* </li>
93110
* <li>
94111
* <p>
95-
* <b>S3 Block Public Access</b> - If your specific use case requires granting public access to your S3 resources, you can disable Block Public Access. You can create a new bucket with Block Public Access enabled, then separately call the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">
112+
* <b>S3 Block Public Access</b> - If your
113+
* specific use case requires granting public access to your S3 resources, you
114+
* can disable Block Public Access. You can create a new bucket with Block
115+
* Public Access enabled, then separately call the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">
96116
* <code>DeletePublicAccessBlock</code>
97117
* </a> API. To use this operation, you must have the
98-
* <code>s3:PutBucketPublicAccessBlock</code> permission. By default, all Block
99-
* Public Access settings are enabled for new buckets. To avoid inadvertent exposure of
100-
* your resources, we recommend keeping the S3 Block Public Access settings enabled. For more information about S3 Block Public Access, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Blocking public
101-
* access to your Amazon S3 storage </a> in the <i>Amazon S3 User Guide</i>. </p>
118+
* <code>s3:PutBucketPublicAccessBlock</code> permission. By default, all
119+
* Block Public Access settings are enabled for new buckets. To avoid
120+
* inadvertent exposure of your resources, we recommend keeping the S3 Block
121+
* Public Access settings enabled. For more information about S3 Block Public
122+
* Access, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Blocking
123+
* public access to your Amazon S3 storage </a> in the
124+
* <i>Amazon S3 User Guide</i>. </p>
102125
* </li>
103126
* </ul>
104127
* </dd>
105128
* </dl>
106129
* <important>
107-
* <p> If your <code>CreateBucket</code> request sets <code>BucketOwnerEnforced</code> for Amazon S3 Object Ownership
108-
* and specifies a bucket ACL that provides access to an external Amazon Web Services account, your request fails with a <code>400</code> error and returns the <code>InvalidBucketAcLWithObjectOwnership</code> error code. For more information,
109-
* see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-ownership-existing-bucket.html">Setting Object
110-
* Ownership on an existing bucket </a> in the <i>Amazon S3 User Guide</i>. </p>
130+
* <p> If your <code>CreateBucket</code> request sets <code>BucketOwnerEnforced</code> for
131+
* Amazon S3 Object Ownership and specifies a bucket ACL that provides access to an external
132+
* Amazon Web Services account, your request fails with a <code>400</code> error and returns the
133+
* <code>InvalidBucketAcLWithObjectOwnership</code> error code. For more information,
134+
* see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-ownership-existing-bucket.html">Setting Object
135+
* Ownership on an existing bucket </a> in the <i>Amazon S3 User Guide</i>.
136+
* </p>
111137
* </important>
112138
* <p>The following operations are related to <code>CreateBucket</code>:</p>
113139
* <ul>

clients/client-s3/src/commands/CreateMultipartUploadCommand.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export interface CreateMultipartUploadCommandOutput extends CreateMultipartUploa
5151
* <p>If you have configured a lifecycle rule to abort incomplete multipart uploads, the
5252
* upload must complete within the number of days specified in the bucket lifecycle
5353
* configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort
54-
* action and Amazon S3 aborts the multipart upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config">Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration</a>.</p>
54+
* action and Amazon S3 aborts the multipart upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config">Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle
55+
* Configuration</a>.</p>
5556
* <p>For information about the permissions required to use the multipart upload API, see
5657
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart
5758
* Upload and Permissions</a>.</p>
@@ -126,19 +127,19 @@ export interface CreateMultipartUploadCommandOutput extends CreateMultipartUploa
126127
* </dd>
127128
* <dt>Server-Side- Encryption-Specific Request Headers</dt>
128129
* <dd>
129-
* <p>Amazon S3 encrypts data
130-
* by using server-side encryption with an Amazon S3 managed key (SSE-S3) by default. Server-side encryption is for data encryption at rest. Amazon S3 encrypts
131-
* your data as it writes it to disks in its data centers and decrypts it when you
132-
* access it. You can request that Amazon S3 encrypts
133-
* data at rest by using server-side encryption with other key options. The option you use depends on
130+
* <p>Amazon S3 encrypts data by using server-side encryption with an Amazon S3 managed key
131+
* (SSE-S3) by default. Server-side encryption is for data encryption at rest. Amazon S3
132+
* encrypts your data as it writes it to disks in its data centers and decrypts it
133+
* when you access it. You can request that Amazon S3 encrypts data at rest by using
134+
* server-side encryption with other key options. The option you use depends on
134135
* whether you want to use KMS keys (SSE-KMS) or provide your own encryption keys
135136
* (SSE-C).</p>
136137
* <ul>
137138
* <li>
138139
* <p>Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key
139-
* (<code>aws/s3</code>) and KMS customer managed keys stored in Key Management Service (KMS) – If you
140-
* want Amazon Web Services to manage the keys used to encrypt data, specify the following
141-
* headers in the request.</p>
140+
* (<code>aws/s3</code>) and KMS customer managed keys stored in Key Management Service (KMS) –
141+
* If you want Amazon Web Services to manage the keys used to encrypt data, specify the
142+
* following headers in the request.</p>
142143
* <ul>
143144
* <li>
144145
* <p>
@@ -163,9 +164,10 @@ export interface CreateMultipartUploadCommandOutput extends CreateMultipartUploa
163164
* protect the data.</p>
164165
* </note>
165166
* <important>
166-
* <p>All <code>GET</code> and <code>PUT</code> requests for an object protected
167-
* by KMS fail if you don't make them by using Secure Sockets Layer (SSL),
168-
* Transport Layer Security (TLS), or Signature Version 4.</p>
167+
* <p>All <code>GET</code> and <code>PUT</code> requests for an object
168+
* protected by KMS fail if you don't make them by using Secure Sockets
169+
* Layer (SSL), Transport Layer Security (TLS), or Signature Version
170+
* 4.</p>
169171
* </important>
170172
* <p>For more information about server-side encryption with KMS keys
171173
* (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting Data

clients/client-s3/src/commands/DeleteBucketEncryptionCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ export interface DeleteBucketEncryptionCommandOutput extends __MetadataBearer {}
3636

3737
/**
3838
* @public
39-
* <p>This implementation of the DELETE action resets the default encryption for the
40-
* bucket as server-side encryption with Amazon S3 managed keys (SSE-S3). For information about the
41-
* bucket default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 Bucket Default Encryption</a>
39+
* <p>This implementation of the DELETE action resets the default encryption for the bucket as
40+
* server-side encryption with Amazon S3 managed keys (SSE-S3). For information about the bucket
41+
* default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 Bucket Default Encryption</a>
4242
* in the <i>Amazon S3 User Guide</i>.</p>
4343
* <p>To use this operation, you must have permissions to perform the
4444
* <code>s3:PutEncryptionConfiguration</code> action. The bucket owner has this permission

0 commit comments

Comments
 (0)