Next.js Discord

Discord Forum

S3 bucket problem

Unanswered
Channel catfish posted this in #help-forum
Open in Discord
Channel catfishOP
in the next project, how can I use images from private s3 bucket
Who has got experience with this?

2 Replies

@Channel catfish in the next project, how can I use images from private s3 bucket Who has got experience with this?
if you s3 is publically accessable, you can directly enter the correct url to your s3 file and serve them thought it.

If you have blocked the public access, you can only enter them via your access token & secret. For that you need to generate pre signed urls, which you can then use, to serve the files.

That's a little complicated and expensive as well, so you might want to serve your files though a CDN (save files in s3 & serves them with cdn). I like to use bunnycdn, because they are cheap and they have already integrated s3 with credentials, so you can easily just say mybunny.cdn/my/file.png to access it.
@Channel catfish solved?