0

I've been googling for a solution for some time and tried a couple of ways to solve this. In short: I used the sample from https://cloud.google.com/appengine/docs/python/googlecloudstorageclient/getstarted to create my own uploader, but it dies on the error, mentioned here: No api proxy found for service "app_identity_service" when running GAE script So, from what I understand, the script needs to be uploaded to google app engine and run from there using App Engine console. But even if it's possible, how do I automate it ?

Or maybe there are other solutions I'm missing. I looked through appcfg.pya but didn't find such an option as well.

Community
  • 1
  • 1
Andrew_Lvov
  • 4,621
  • 2
  • 25
  • 31

2 Answers2

2

You are following a sample to upload from GAE to Cloud Storage. If your only goal is to upload files to Cloud storage, then simply use gsutil. You can easily script with gsutil, do streaming copy, copy full directories and rsync a file system.

Why you need GAE in your solution ?

koma
  • 6,486
  • 2
  • 27
  • 53
1

Google App Engine allows you to easily upload static files and serve them but if you simply just want a place to store static files then Google Cloud Storage is the way to go. It's much easier to use the gsutil tool to automate uploading your content than deploying using the App Engine SDK. The infrastructure serving the Cloud Storage files is the same as App Engine so there's really no advantage to using App Engine's static files feature.

Also, If you need a way to set up a custom domain, index page, and/or error pages you may want to check out the guide on Configuring a Bucket as a Website.

Ian Lewis
  • 917
  • 1
  • 7
  • 17
  • Thank you, just viewed the "Configuring a Bucket as a Website" url. There is a think I didn't find how to configure though is to specify redirect urls in app.yaml for static to redirect to external cloud storage, GCS in this case. – Andrew_Lvov Jul 27 '15 at 08:10
  • You shouldn't need to use App Engine at all if you have a custom domain as you can just set up the custom domain to point to cloud storage. Is the issue that you are already using App Engine (using an appspot.com domain) and would like to redirect to the domain you setup up in cloud storage instead? – Ian Lewis Jul 27 '15 at 08:33