From the course: Data Science on Google Cloud Platform: Exploratory Data Analytics

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Managing buckets

Managing buckets - Google Cloud Tutorial

From the course: Data Science on Google Cloud Platform: Exploratory Data Analytics

Start my 1-month free trial

Managing buckets

- [Narrator] Let's see how we can create a bucket from DataLab. Both using the command line, and the SDK. I will start with the command line. We use the create option in the gcs command, to create the bucket. We specify the full URL of the bucket. Please do remember that bucket names are global, within GCP. So if you try creating a bucket that already exists, it is going to give an error. Next, we will use the SDK to do the same. We have already imported the SDK into this notebook. So we proceed to set up an object called api_bucket, with the name of the bucket we intend to create. We then call the create function, on the api_bucket object. We then check if the bucket exists, by calling the exists function, and that returns a true value. To check buckets that are created using both the command lines and SDK, we execute the list command, it returns all the buckets in your project. Including those that were just created. Pretty simple, right? Now, we have two options to create buckets…

Contents