lib-storage Upload working but result is missing
See original GitHub issueDescribe the bug
Hello there,
Since 3.26.0 the Upload
command from lib-storage does not return the same data and therefore is not usable
Edit: to clarify : the file is sent correctly to the bucket, but the result is not correct
Your environment
SDK version number
@aws-sdk/client-s3: 3.26.0 and 3.27.0
@aws-sdk/lib-storage: 3.26.0 and 3.27.0
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
▶ node -v
v16.2.0
Steps to reproduce
const client = new S3({
region,
credentials: {
accessKeyId,
secretAccessKey,
},
})
const params = {
Bucket: bucket,
Key: filename,
Body: file,
ACL: 'public-read',
ContentType: type,
}
const upload = new Upload({
client,
queueSize: 3,
params,
})
const data = await upload.done()
console.log({ data })
Observed behavior
With 3.26.0 and 3.27.0, the content of data is
{
data: {
'$metadata': {
httpStatusCode: 200,
requestId: undefined,
extendedRequestId: 'dD4fCNw0SfXPpz6AKXc......',
cfId: undefined,
attempts: 1,
totalRetryDelay: 0
},
BucketKeyEnabled: undefined,
ETag: '"8e79af4e71fa......."',
Expiration: undefined,
RequestCharged: undefined,
SSECustomerAlgorithm: undefined,
SSECustomerKeyMD5: undefined,
SSEKMSEncryptionContext: undefined,
SSEKMSKeyId: undefined,
ServerSideEncryption: 'AES256',
VersionId: 'OCh1_......'
}
}
Expected behavior
with 3.25.0 the result is
{
data: {
'$metadata': {
httpStatusCode: 200,
requestId: undefined,
extendedRequestId: 'H2cT3+QuQ3vG2/fBtj/GP8g...',
cfId: undefined,
attempts: 1,
totalRetryDelay: 0
},
Bucket: 'The name of the bucket',
BucketKeyEnabled: undefined,
ETag: '"5a101d2..."',
Expiration: undefined,
Key: 'the key provided',
Location: 'https://xxx.s3.eu-central-1.amazonaws.com/the key provided',
RequestCharged: undefined,
SSEKMSKeyId: undefined,
ServerSideEncryption: 'AES256',
VersionId: '28mF6wpfmGAe...'
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Amazon S3 bucket file upload response is not available
I have whole code using multer and aws-sdk. include this files and npm install all //aws s3 packages const aws = require("aws-sdk"); const ......
Read more >Resolve errors uploading data to or downloading ...
I want to download data from Amazon Aurora and upload it to Amazon S3. How can I resolve an error I received while...
Read more >Resolve issues with uploading large files in Amazon S3
I'm trying to upload a large file (1 GB or larger) to Amazon Simple Storage ... A multipart upload can result in faster...
Read more >Migrating to AWS SDK v3 for Javascript
tips, gotchas and surprises with the new AWS SDK. ... @aws-sdk/lib-dynamodb; The implementation for s3.upload is now in @aws-sdk/lib-storage ...
Read more >[solved] AWS S3 - File uploads - Get Help and Help Others
Actually with text files is working correctly but using images, the files are uploading to the bucket but not showing correctly (looks like...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@samchungy thanks for the PR, I have had someone look at it, can you please address the comments. Thanks for your contribution as well.
ditto^. experiencing same problem trying to upgrade from
v2
->v3
for bundle size reduction benefits. Downgrading to3.25.0
works for me as well as a temporary fix. Bumping to hopefully get this rectified.