Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

I getting access denied error for bucket GCP

  • This is structure
  • From Load Balancer -> Bucket GCP
  • Bucket not public.
  • I need to deploy frontend on GCP bucket access only throgh Load balancer.
  • Like in AWS we only access S3 using Cloudfront not directly accessible.
  • Please tell what do and is there any alternative in GCP to deploy frontend
  • google-cloud-storage
  • Please tell what do and is there any alternative in GCP to deploy frontend
0 4 382
4 REPLIES 4

Hi @JigarM,

Welcome to Google Cloud Community!

You’ve mentioned that the bucket is currently set to private. Set the bucket to public. Bucket set to private does not necessarily cause a permission issue but just make sure you have the correct roles assigned nonetheless. See IAM roles for Cloud Storage for reference.

Also, make sure that the bucket name is unique. See Bucket name considerations for more info.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

Hello @jamespatrickm , 

I want keep bucket private bucket, it only accessible through load balancer only.


like in AWS we have cloudfront using it Origin identity access S3 bucket only accessed using cloudfront only, without making S3 bucket Public.

is there any way to do that in GCP?

Hi, @JigarM.

I'm not sure if you're still considering this solution, but I have a detailed documentation with examples that could be useful for your scenario. Take a look it - Protecting static website assets hosted on Cloud Storage,  if you're planning to implement this.

Regards,
Mokit

There is a way to do it.
Create a bucket privately 
Create a load balancer with backend as the bucket you have created.
Make sure to host the files in the bucket.
Also, there is no way we can integrate buckets as frontend.