Getting started with Google Cloud Storage
Create a Bucket
Buckets are the basic containers that hold your data in Cloud Storage.
To create a bucket:
- In the Cloud Console, go to Navigation menu > Cloud Storage > Browser.
- Click Create Bucket:
- Enter your bucket information and click Continue to complete each step:
- Name your bucket: Enter a unique name for your bucket. For this lab, you can use your Project ID as the bucket name because it will always be unique.
- Choose Region for Location type and us-east1 (South Carolina) for Location.
- Choose Standard for default storage class.
- Choose Uniform for Access control.
- Click Create.
Upload an object into the Bucket
To upload the image above into your new bucket:
- Right-click on the image above and download it to your computer. Save the image as kitten.png, renaming it on download.
- In the Cloud Storage browser page, click the name of the bucket that you created.
- In the Objects tab, click Upload files.
- In the file dialog, go to the file that you downloaded and select it.
- Ensure the file is named kitten.png. If it is not, click the three dot icon for your file, select Rename from the dropdown, and rename the file to kitten.png.
After the upload completes, you should see the file name and information about the file, such as its size and type.
Share a Bucket Publicly
To allow public access to the bucket and create a publicly accessible URL for the image:
- Click the Permissions tab above the list of files.
- Ensure the view is set to Principals. Click Add to view the Add principals pane.
- In the New principals box, enter allUsers.
- In the Select a role drop-down, select Cloud Storage > Storage Object Viewer.
- Click Save.
- In the Are you sure you want to make this resource public? window, click Allow public access.
Create Folders
- In the Objects tab, click Create folder.
- Enter folder1 for Name and click Create.
You should see the folder in the bucket with an image of a folder icon to distinguish it from objects.
Create a subfolder and upload a file to it:
- Click folder1.
- Click Create folder.
- Enter folder2 for Name and click Create.
- Click folder2.
- Click Upload files.
- In the file dialog, navigate to the screenshot that you downloaded and select it.
After the upload completes, you should see the file name and information about the file, such as its size and type.
Delete a folder
- Click the arrow next to Bucket details to return to the buckets level.
- Select the bucket.
- Select the checkbox next to folder1.
- Click on the Delete button.
- In the window that opens, type
DELETE
to confirm the deletion of the folder. - Click Delete to permanently delete the folder and all objects and subfolders in it.
Tag:Google Cloud