Getting this error while downloading a file from amazon S3 bucket

hey there,
I am trying to download a particular file from my s3 AWS bucket. Here file is getting opened but not getting download file is opening in a new tab. here is the screenshot of my console error:

Private files on S3 can only be accessed using the private API keys (which you should never use client-side)

It looks like you’re downloading it directly from S3 to the client (rather than from your server). If your data protection allows, make sure the file is public

if it has to be protected
use a signed download link
or download to the server and then to the client