I have an image in my AWS S3 carpet. Can I include this image on my site by placing the AWS URL in the <img> ? The URL includes options like Amz-Signature, Amz-Credential, and amz-security-token. Can they be maliciously used to access other files in my S3 bucket?
Here is an example URL:
https:
Alternatively, I can create an expiration URL from my C # code using the AWS SDK. Sort of:
var expiryUrlRequest = new GetPreSignedUrlRequest { BucketName = WebConfigurationManager.AppSettings["AWSBucketName"], Key = fileName, Expires = DateTime.Now.AddHours(3) };
This gives a URL with the AWSAccessKeyId parameter.
Are these URLs safe to use on my webpage? What risks may be associated with their use on my website?
Thanks so much for your time. Please let me know if you need more information or I do not know.
EDIT. To give some idea of my application, users upload the file to the S3 bucket. I use SignalR to confirm that the image is in a bucket, showing the S3 image on my web page for viewing by the user.
source share