Create Google Cloud Storage Bucket

This is a short introduction to help you create a storage bucket on Google Cloud Platform (GCP).
(Please tell me if you find any errors or omissions in the document —UP, 13-October-2022)

Create a new project

Redeem and use your Google coupon. Do not enter your credit card. (If you have not received an email with the link to redeem a coupon, please see CS 4750 Fall 2022 Collab's Announcement "Database server (and web server) options, and Google Cloud Platform coupon" on 31-Aug-2022)

  1. Assuming that you already have a Google account. Go to the Google Cloud Console and login to your account
  2. Click the "Select a project" dropdown icon (next to "Google Cloud Platform")

    dropdown to select a project

  3. Select  New Project

    dropdown to select a project

    This will prompt a screen allowing you to create a new project. Enter your  Project Name (e.g., cs4750db), be sure the  Billing account is associated with the Google coupon you redeemed. Then, click  CREATE.

    image showing how to create a new project


Create Google Cloud Storage Bucket

  1. Access the project you just created
  2. Click the Navigation Menus (a "hamburger menu" icon, top left of the screen), then select  Cloud Storage >> Buckets

    image showing how to create a bucket

  3. Click the  Create bucket option.

    image showing how to create GCP bucket

    If you have previously created buckets or deploy web apps, you will see a list of your existing buckets similar to the following screen. Click the  CREATE  option.

    image showing how to create GCP bucket

  4. On the  Create a bucket screen, enter your bucket's name (for example, cs4750db-demo). The bucket serves as your root folder; i.e., the main context directory of your web app / website. Click  continue. You may need to click  Choose where to store your data  to expand the option. Select  Regional for  Location type, and select  us-east4 for  Location; then click the  Create button

    image showing how to create a bucket

  5. You may access the bucket you just created from the  Buckets screen

    image showing how to create a bucket


Upload files

  1. Go to the bucket you just created (click on the bucket name, cs4750db-demo)
  2. Select the  Upload Files option to upload your file(s) or the  Upload folder option to upload your folder(s).

    image showing how to upload files and folders to GCP storage

    The folder structure should be consistent with how your web resources (html, css, js, images, media, data files) are organized.


Edit permission

To make your file(s) or page(s) publicly available, you need to set the bucket's permissions.

  1. On the Bucket details screen, select your bucket.

    image showing how to set permission on a bucket

    Alternatively, you may click the "three-vertical dots" option on the right, and then select  Edit access.

    Do not export to cloud

    Click  Remove public acess prevention to make the bucket publicly available, then click Confirm

    image showing how to set permission on a bucket

    It should show that your bucket is not Public to internet.

    If you want to grant access to any user, click the Grant Access option.


Test access

Assuming that your bucket has been made publicly available and you have uploaded some  .html  files.

On the  Bucket details screen, locate your file, click a Copy URL link under  Public access column.

image showing how to access a file stored in a bucket

Alternatively, you may access your file (in this example,  .html ) via a web browser. Your URL will be similar to
    https://storage.googleapis.com/your-bucket-name/yourfile.html
(for example, https://storage.googleapis.com/cs4750db-f22/bootstrap-example.html