You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously it worked fine, but since today I have been receiving an '[ Server ] Error: Unauthenticated access is not supported for this identity pool.' when trying to call getUrl from a unauthenticated guest user. I have changed nothing with the configuration and both my production and development builds now do not load images if the user is unauthenticated.
I do have Amplify.configure(outputs, { ssr: true,}); configured
Expected behavior
get my images showing up in my app.
Reproduction steps
Install dependencies.
Run next dev --turbopack
Create a page.tsx file, not with use Client
Add to generatedMetadata a call to getUrl (Use the utility I have below so it uses the /server one
Be unauthenticated
Code Snippet
// Put your code below this line.exportconststorage=defineStorage({name: "Bucket",isDefault: true,access: (allow)=>({"images/{entity_id}/*": [allow.entity("identity").to(["read","write","delete"]),allow.guest.to(["read"]),allow.authenticated.to(["read"]),],}),triggers: {onUpload: compressImage,},});
and this is how I call it within the generateMetadata()
import{getUrl}from"aws-amplify/storage/server";exportasyncfunctiongetUrlSession(fileUrl){try{consturl=awaitrunWithAmplifyServerContext({nextServerContext: { cookies },operation: (contextSpec)=>getUrl(contextSpec,fileUrl),});returnurl;}catch(error){console.error(error);}}
Log output
// Put your logs below this line
aws-exports.js
No response
Manual configuration
No response
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
The text was updated successfully, but these errors were encountered:
Hello, @itsRares 👋 and thanks for opening this issue. The error that you're seeing of "Unauthenticated access is not supported for this identity pool." is usually associated with changes to IAM permissions, using different backend resources, etc. I know you mentioned you made no changes to your configuration, but can you check to ensure the both the auth and unauth (guest) roles for the identity pool have the permissions needed? This doc may be of assistance as well, but let us know if you check this and the issue persists.
Hey @cwomack Thanks for getting back so quick. I followed the doc and oddly for some reason the identity pools had guest access as inactive. I activated it again and it is working now! Thanks for the help 😄
Is there a misconfiguration on my end or something I could have done wrong which could have caused it to go to inactive? So I know not to trigger it again.
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Storage
Amplify Version
v6
Amplify Categories
storage
Backend
Amplify Gen 2
Environment information
Describe the bug
Previously it worked fine, but since today I have been receiving an '[ Server ] Error: Unauthenticated access is not supported for this identity pool.' when trying to call getUrl from a unauthenticated guest user. I have changed nothing with the configuration and both my production and development builds now do not load images if the user is unauthenticated.
I do have Amplify.configure(outputs, { ssr: true,}); configured
Expected behavior
get my images showing up in my app.
Reproduction steps
Install dependencies.
Run next dev --turbopack
Create a page.tsx file, not with use Client
Add to generatedMetadata a call to getUrl (Use the utility I have below so it uses the /server one
Be unauthenticated
Code Snippet
and this is how I call it within the generateMetadata()
and this is my util for getting server side urls
Log output
aws-exports.js
No response
Manual configuration
No response
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
The text was updated successfully, but these errors were encountered: