Download objects into memory

This page shows you how to download objects from your Cloud Storage buckets into memory by using Cloud Storage client libraries. Downloading into memory is useful when you want to avoid unnecessary writes to persistent storage. For instructions on how to download objects directly to persistent memory, see Downloading objects to persistent memory. For a conceptual overview of how downloads work in Cloud Storage, see Uploads and downloads.

Required roles

In order to get the required permissions for downloading objects into memory, ask your administrator to grant you the Storage Object Viewer (roles/storage.objectViewer) role on the bucket.

This role contains the permission required to download objects. To see the exact permission that's required, expand the Required permissions section:

Required permissions

  • storage.objects.get

You might also be able to get this permission with other predefined roles or custom roles.

For instructions on granting roles on buckets, see Use IAM with buckets.

Download an object into memory

Client libraries

What's next