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, 18-January-2020)

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 notify the course instructor via email.)

  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  Storage

    image showing how to create a bucket

  3. On the  Storage's Browser screen, 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 the  Strorage's Browser  screen with a list of your existing buckets similar to the following screen. Click the  CREATE BUCKET  option.

    image showing how to create GCP bucket

  4. On the  Create a bucket screen, enter your bucket's name (for example, webpl-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  Browser 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 Browser screen, select your bucket. Click the "three-veritical dots" option on the right,

    image showing how to set permission on a bucket

    Select  Edit bucket permissions

    image showing how to set permission on a bucket

    Do not export to cloud

    On the  INFO PANEL screen, click the  ADD MEMBER button

    image showing how to set permission on a bucket

    Enter  allUsers in the  New members textbox and select a role as  Storage Object Viewer, then click the  Save button.

    image showing how to set permission on a bucket

    Now, your bucket is publicly available

    image showing how to set permission on a bucket

    If you need to delete members, open an  Edit bucket permissions.  On the  INFO PANEL  screen, enter the user you wish to remove (for example, enter  allUsers) in the  Filter tree  textbox. Once the member is found, click a "trash" icon. Alternatively, you may select the  Role / Member >> Storage Object Viewer  to locate the members to be deleted.

    image showing how to set permission on a bucket


Test access

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

On the  Storage's Browser screen, locate your file, click a "hyperlink" icon 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/webpl-demo/bootstrap-example.html)