1. Go to the Data Tab and click the Mount GCP Bucket button.
  1. If you have not connected any GCP projects to Latch, click the Add Project button.
  1. Click on the Authorize Project Access button and go through the authentication flow with Google. This will permit Latch to access the list of the projects that you have access to for 1 hour.
  1. Select the project from the dropdown that contains the bucket you want to mount.
  1. You will need to authorize Latch to list the buckets in your project and give Storage Admin permission to the bucket that you want to mount. Latch requires the following permissions in your project:

    • storage.buckets.list permission on the project level.
    • Storage Admin on the bucket level.
  2. To give Latch storage.buckets.list permission, go to the Create Custom Role page in your project.

    1. Give the role name Bucket Lister.
    2. Click on Add Permissions and enter storage.buckets.list. This will permit Latch to list buckets in your project which is required when mounting your bucket. After you have mounted the bucket, you can remove this permission.
    3. Click on Create.
    1. Go to the IAM & Admin page in your project.
    2. Click on Add and enter the email address latch-data@latchbio.iam.gserviceaccount.com and select the role Bucket Lister that you created.
    3. Click on Save.
  3. To give Latch Storage Admin permission on the bucket level, you need to go to the Storage Browser page in your project.

    1. Click on the bucket that you want to mount.
    2. Click on Permissions and Grant Access.
    3. Enter the email address latch-data@latchbio.iam.gserviceaccount.com and select the role Storage Admin.
    4. Click on Safe.

Note: On mount, Latch will set up notifications for the bucket to monitor file updates in the bucket and update the CORS policy to allow Latch to access the bucket data from the browser.

  1. Click on Verify on Latch Console to verify that Latch has the required permissions in your project.
  1. Back on the main page, select your project in the list.
  1. You need to enable versioning for your bucket before you can mount it.
    1. Go to the Storage Browser page in your project.
    2. Click on the bucket that you want to mount.
    3. Click on Protection and enable versioning.
  1. Select the bucket you want to mount and click Mount/Add Link. The modal will close and the bucket you added will appear in the data list.

Removing a Mounted Bucket

  1. Simply hover over the bucket in the data viewer, click the ellipsis and select Remove.

Troubleshooting

My bucket isn’t showing up in the list in the Mount S3 Bucket modal.

This might be because your bucket isn’t versioned. Latch only supports versioned buckets for mounting. To check to see if your bucket is versioned or not, open the bucket in GCP, go to the Protection tab and check that the Object Versioning is enabled.