Using GAE to upload images to Google Cloud Storage?

49 views
Skip to first unread message

Parth Mishra

unread,
Jul 12, 2018, 12:03:20 AM7/12/18
to Google App Engine
I have a standard environment service that is handling HTTP POST requests of images. It basically just creates a unique ID for them based on some request metadata and then uploads to Cloud Storage.

My question is, is GAE the right choice to handle this? I'll be getting ~70K of these images (less than an MB each) throughout the day with various peak and slow traffic times. I cant' generate a signed URL since the application sending the request is an external, non-user application. 

Ani Hatzis

unread,
Jul 12, 2018, 5:52:40 AM7/12/18
to Google App Engine
Non-user applications can create signed URLs, see Creating Signed URLs with a Program. You can do that in App Engine, if you want to enforce some kind of business logic, or let the external app create the signed URL by itself. With that approach the actual upload would go directly into the GCS bucket, without GAE in the middle.

However, if you don't need to return the unique ID in the response of the upload, you could consider to use a Google Cloud Function (Node.js and triggered by events in a GCS bucket, such as after an object is written into the bucket). The function gets the metadata of the written object and can create the unique ID and can write it to Cloud Datastore, for example, or to the custom metadata of the GCS object. For details see GCF's Cloud Storage Tutorial.

George (Cloud Platform Support)

unread,
Jul 12, 2018, 10:26:16 AM7/12/18
to Google App Engine
GAE is designed with scalability in mind. You may choose the best set of parameters to fit your traffic patterns and general needs. More detail may be read on the "Designing for Scale" documentation page. [1]

Reply all
Reply to author
Forward
0 new messages