0
votes

I have read that you need to configure HTTPS in order so that your bucket can be used like this:

https://my.bucket.com/foo.png

However, after looking through those two pages, I still have no idea how to actually configure this in Google Cloud Storage. Wondering if one could quickly show how I go about getting HTTPS working on my Google Cloud Storage bucket my.bucket.com. I have the CNAME configured with my DNS system, so http://my.bucket.com/foo.png works, but https://my.bucket.com/foo.png does not.

I simply have images in my bucket which I want to access via HTTPS. I don't have any compute vms or any of that.

Looking here for inspiration.

2

2 Answers

0
votes

Using HTTPS with Google Cloud Storage can be pretty easy, so long as you are not using custom domain names. For example, https://storage.googleapis.com/my.bucket.com/foo.png will work just fine.

If you need to serve those resources from a custom domain name, though, that's a bit trickier. You have two main options:

  1. Use Firebase Hosting. Firebase supports custom domain names and serves objects from Google Cloud Storage buckets.

  2. Set up a Google Cloud Load Balancer (GCLB) with a custom domain name and backed by a GCS bucket. The advantage here is that this gives you a lot of additional power and freedom (you can name your bucket whatever you want, you can serve multiple buckets from the same domain name, you can add non-GCS routes, etc). The disadvantage is that load balancers are pretty expensive for smaller use cases and are relatively complicated.