Sharing file from one project bucket into another project bucket.

  • date 9th April, 2021 |
  • by Prwatech |
  • 0 Comments

Prerequisties

Hardware  :  GCP

Google account

We might need to copy file from one project bucket into another project bucket. To establish this transfer we have to give the permissions.

Open cloud SDK

Type

 $         gsutil cp gs://<source_bucket_name>/*  gs://destination_bucket_name/

It will show Access Denied Exception. It’s because the destination project is restricting the data transfer from unknown sources. We have to give the permission.

Open the Cloud Console in the destination project.

Open Menu > IAM & Admin > IAM

Click on Add

Give the permission of the owner of the Source project in the destination project as object creator.

Click Save.

Now Execute the below code

$          gsutil cp gs://<source_bucket_name>/*  gs://destination_bucket_name/

Now It will Copy the file from one project into another project

Quick Support

image image