-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting NoCredentials Error while performing List, Upload and Other file actions on S3 bucket from Amplify V6 react application #13184
Comments
Amplify documentation really needs a revamp. A lot of things are either not documented or fail to work :( |
@nadetastic Please assist us with this issue. If it helps, I am mentioning below links of previously riased issues of same project by our team. |
Hello, @saurabhunde 👋. It looks like you're missing the @sumitsahoo, that's valid feedback and we would love to hear how we can make it better! Feel free to open up a docs issue here or let me know via a reply back if there's something specific you're looking for. I think we could make the scoped examples for configs a little easier to find (rather than buried inside that last option of the block switcher). |
@cwomack I have added Updated Auth config:
Here is error message:
|
Hi @cwomack , Thank you for your reponse on my issue. |
I'm also getting similar. If I configure my Auth as follows, then basically every API I have starts complaining - these are all different Amplify projects that import the Auth cateory. There had been no changes prior to today and we were working on something unrelated to work round another bug. Auth: {
Cognito: {
identityPoolId: <imported>
userPoolId: <imported>
userPoolClientId: <imported>
}
}, When I remove When
When I remove
My upload configuration is as follows: const uploadedFile = await uploadData({
path: ({identityId}) => `protected/${identityId}/profile.${fileExtension}`,
data: file,
options: {
onProgress // Optional progress callback.
}
}).result; Finally, when I call:
|
I was having similar issues switching between public (apiKey) and Cognito user pool users. Would get errors like
I could not find this documented anywhere, the authMode param in generateClient, however it is there if you check the types for "aws-amplify": "6.3.6" |
I'm also running into this, aws-amplify 6.6.0. Auth and storage configured manually. I hadn't had an identity pool configured, but finally figured out that that was why the auth session had no |
@sumitsahoo How are you creating your identityPool? Are you doing it manually or via CLI? If manually, it appears to me that there might be a misconfiguration issue between IAM and the identityPool. |
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Storage
Amplify Version
v6
Amplify Categories
auth, storage
Backend
Amplify CLI
Environment information
Describe the bug
I am trying to perform List, Upload file actions in my amplify react application. But I am getting below error while performing file upload and list files operations.
Error : NoCredentials: Credentials should not be empty.
Note- We are using federated usrs from Azure AD and have configured Azure AD ipd using SAML. All of the users will logging through this idp only. And we need to provide S3 file access to logged in users only.
I followed below steps to add and configure storage using Amplify CLI. Please refer below section
Expected behavior
Reproduction steps
amplify add storage
Content (Images, audio, video, etc.)
Yes
Default configuration
No, I am done.
testS3
testS3bucket
Auth users
create/update, read, delete
No
Configured-
Amplify.configure({
....
//added S3 config
Storage: {
S3: {
bucket: "testS3bucket",
region: "us-east-1",
}
}
})
Refer File upload and List files code from below code snippets
Code Snippet
Log output
Console Error while listing files
Console error while upload
aws-exports.js
No response
Manual configuration
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: