Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon S3 hardcode my bucket URL

I am using Amazon S3 to store images for my web app and iOS app.

I wonder if I can safely hardcode my bucket URL when fetching the images? So that I don't have to make one more API call just to fetch my URL.

For example, hardcoding this in my apps code:

https://s3.eu-central-1.amazonaws.com/mybucket/images/{some_var}
like image 810
user2636197 Avatar asked Apr 21 '16 22:04

user2636197


1 Answers

Yes should be safe.

If this did change then it would break.. so much. AWS service name, region, domain are unlikely to change. The other parts of the URL are under your control.

like image 137
cjwfuller Avatar answered Nov 09 '22 21:11

cjwfuller