Replies: 2 comments
-
Hi @xinluleo , For the SDK to sign your requests, it needs to draw credentials from somewhere. Here is an article of all the different ways you can load credentials. Let me know if you have any other questions. Thanks, |
Beta Was this translation helpful? Give feedback.
-
For me the issue was, that I used the "bundled" sdk classes instead of aws provided ones. I had to add the aws-sdk/* to the external rollupOptions. Vite-Config: // https://vite.dev/config/
export default defineConfig({
build: {
[...]
rollupOptions: {
external: [
'@aws-sdk/client-s3',
'@aws-sdk/client-codeartifact',
'@aws-sdk/client-cloudfront',
...builtinModules,
],
},
[...]
},
}); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am trying to upload a pdf file to my S3 bucket. It should be an easy task. I followed the example here: https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javascriptv3/example_code/s3/src/s3_upload_object.js, but got the following error:
My code is attached below:
src/lib/s3client.tsx:
upload util function:
The fortue-files bucket is created with all default settings. What is the credential I am missing here?
Beta Was this translation helpful? Give feedback.
All reactions