Google Cloud Storage (GCS) is Google Cloud’s object storage service. You store data as objects in buckets, choose a location and a default storage class for each bucket, and control access with Identity and Access Management (IAM). It is built for applications, backups, data lakes and archives. It is not the everyday file sync and sharing app that Google Drive provides.
What Google Cloud Storage is
Google introduced the service in 2010 as Google Storage for Developers. It has since been renamed Google Cloud Storage. It holds unstructured data such as images, video, documents, logs and backups. Teams use it with BigQuery for data lakes, with Vertex AI for machine learning datasets, and to host static website files.
Buckets and objects
- Bucket names are globally unique and 3 to 63 characters long. Names with dots can be longer, up to 222 characters.
- Objects are addressed by name in a flat namespace, the same model as Amazon S3. Names with slashes look like folders, but they are only prefixes.
- Object size can be up to 5 TiB.
- Location is set when you create the bucket. To move data to another location later, use bucket relocation, or create a new bucket and copy the objects.
Location types
Each bucket uses one of three location types:
| Location type | What it means | When to use it |
|---|---|---|
| Region | Data stored in one region | Data kept near compute in one region; usually the least expensive option |
| Dual-region | Two chosen regions, with optional turbo replication that targets a 15-minute recovery point | High availability within a specific pair of regions |
| Multi-region | A large area: the US, the EU or Asia | Serving users or data consumers across a broad area |
Dual-region and multi-region buckets cost more than single-region buckets, so choose the location that matches your availability and latency needs.
Storage classes
Each object has a storage class. Colder classes cost less to keep but have minimum storage durations and retrieval fees.
| Storage class | Minimum storage duration | Typical use |
|---|---|---|
| Standard | None | Data accessed frequently, such as active data lakes and websites |
| Nearline | 30 days | Data accessed less than once a month |
| Coldline | 90 days | Data accessed less than once a quarter |
| Archive | 365 days | Long-term retention and disaster recovery copies |
All classes return data in milliseconds. The colder classes add retrieval fees and charges for deleting data before the minimum duration.
If you don’t know how an object will be accessed, Autoclass can move each object between classes automatically based on how it is used. This can help when access patterns are unpredictable, but check the current pricing to see whether it suits your workload.
Access control and encryption
- Uniform bucket-level access is the recommended setting. You control access with IAM policies on the bucket, rather than with separate per-object access lists.
- Public access prevention blocks public access to a bucket, so a configuration mistake can’t expose its contents.
- Signed URLs (Version 4) grant time-limited access to a single object, for up to 7 days.
- Encryption is applied at rest by default with AES-256. You can use customer-managed keys through Cloud KMS, or supply your own keys.
Data protection
- Object Versioning keeps earlier versions of an object, so overwrites and deletes can be reversed.
- Lifecycle rules move objects to colder classes or delete them on a schedule.
- Retention policies stop objects from being deleted or changed for a set period. Bucket Lock makes a retention policy permanent, so it can’t be removed.
- Soft delete keeps deleted objects recoverable for a set period, which is 7 days by default.
Using Cloud Storage
You can work with buckets in several ways:
- The Google Cloud console in a web browser
- The gcloud storage command-line tool. Google recommends it over the older gsutil tool.
- Client libraries for common programming languages, and the JSON API
- The XML API with HMAC keys, which S3-compatible tools can use
A short command-line example:
gcloud storage buckets create gs://example-bucket --location=us-central1 --default-storage-class=STANDARD
gcloud storage cp report.pdf gs://example-bucket/reports/
Google also provides transfer tools for moving data from Amazon S3 into Cloud Storage.
Google Cloud Storage vs Google Drive
The two services share a name, but they are built for different users.
| Google Cloud Storage | Google Drive | |
|---|---|---|
| Who it is for | Developers, data teams and businesses building applications | Individuals and teams sharing everyday files |
| How you use it | Console, command line and APIs | Web, desktop and mobile apps |
| Structure | Buckets and objects | Folders and files, with sharing |
| Billing | Pay for storage, operations and data transfer | A free allowance, then paid plans |
| Typical use | Backups, data lakes, app media and archives | Documents, photos and shared files |
Common use cases
- Data lakes and analytics, with BigQuery reading data directly from buckets
- Machine learning datasets for training and serving models
- Backups and archives in colder storage classes
- Media and user uploads for applications
- Static website files, usually served through a load balancer or CDN
For the same kinds of work on AWS, see Amazon S3 explained. For how applications talk to these services, see Is S3 a protocol or API?
Common misconceptions
- GCS is not Google Drive. Drive is a personal and team file app. Cloud Storage is a developer service.
- GCS Archive is not slow like tape. Data comes back in milliseconds. The cost of retrieval and early deletion is what to plan for.
- A bucket’s location is not a simple setting to change. Use bucket relocation, or create a new bucket in the new location and copy the data.
- gsutil is not the recommended tool. Use
gcloud storagefor new work.
For security settings that apply to GCS and other providers, read Is cloud storage secure? For backup planning, see what is cloud backup and how does it work? For the wider category, see types of cloud storage services.