I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.
Let's say you want to upload yourfile.txt
to a GCS bucket from your virtual machine.
You can use the gsutil
command line tool that comes installed on all GCE instances.
If you've never used the gcloud
or gsutil
command line tools on this machine before, you will need to initialize them with a service account.