Powered By GitBook
Cloud Storage quickstart: Create a bucket and upload files
Learn how to store objects in Cloud Storage.
Take the interactive version of this tutorial, which runs in the Cloud Console:


Cloud Storage is a powerful and cost-effective storage solution for unstructured objects. In this tutorial, you'll see how easy it is to store objects in Cloud Storage.
Here's what you'll do:
    Create a bucket: Buckets hold the objects (any type of file) that you store in Cloud Storage.
    Upload and share objects: Start using your bucket by uploading an object and making it publicly
    Clean up: As a final step, you'll delete the bucket and object you created for this tutorial.
    It's important that you follow the cleanup steps at the end of the tutorial so that you don't incur
    unexpected charges.

Project setup

Google Cloud organizes resources into projects. This allows you to collect all of the related resources for a single application in one place.
Begin by creating a new project or selecting an existing project for this tutorial.
For details, see Creating a project.

Create a bucket

    Open the Navigation menu in the upper-left corner of the console, and then select Storage.
    On the Create a bucket page, specify the bucket's properties.
    For this tutorial, you can use the default values for everything but Name.
    Here are some things to keep in mind:
      Name: Names must be globally unique. You'll see an error if you enter a
      name that's the same as another bucket's name in Cloud Storage.
      Default storage class: This is the storage class assigned to your
      bucket's objects by default. Your choice depends mainly on how
      frequently you expect the objects to be accessed and whether you're
      serving the data worldwide. The storage class affects your cost.
      Location: You'll want to keep your data close to the applications
      and users accessing it. The available choices depend on your storage
      class selection.
    Click the Create button.

Upload an object

Now that you have a bucket, you can start uploading objects. You can upload any type of file.
    At the top of the Bucket details page, click Upload files​
    and select a file to upload.
    Drag and drop a file onto the space below the bucket name.
    If you're using the interactive version of this tutorial in the Cloud Console, you can
    ​Refresh Bucket at the top of the page to see it in your bucket.

Clean up

To clean up the resources used in this tutorial, delete the bucket that you just created. Deleting a bucket also deletes its contents.
    At the top of the table that lists the contents of your bucket, click Buckets to go back to the Browser page.
    Check the box next to your bucket.
    At the top of the page, click Delete and confirm the deletion.


Now that you know how to store objects in Cloud Storage, here are some things that you can do next:
Last modified 7mo ago