Can't get serving url from GCS in another project

52 views
Skip to first unread message

Shinta HATATANI

unread,
Dec 15, 2016, 9:05:55 AM12/15/16
to Google App Engine
Hello, everyone.

I'm trying to use GAE image service, but I have encountered a problem.

I have two projects.
One has the GAE application and one has the GCS bucket.
(This is because the GAE region can not be changed once the project is created.)
When application call get_serving_url, it is fail with the exception.

Traceback (most recent call last):

  ...

  File "/base/data/home/apps/b~[PROJECT_NAME]/20161215t131056.397760967541775314/main.py", line 125, in _get_serving_url

    return get_serving_url(blob_key)

  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/images/__init__.py", line 1868, in get_serving_url

    return rpc.get_result()

  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 613, in get_result

    return self.__get_result_hook(self)

  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/images/__init__.py", line 1972, in get_serving_url_hook

    raise _ToImagesError(e, readable_blob_key)

TransformationError


I think that the exception occur if GAE and GCS are not in the same project.
The reason is following.
- If GAE and GCS bucket is in the same project, there is no error.
- I have granted access to GAE application.
  1. The GAE service account of the GAE project have storage admin role in GCS project.
  2. The GAE project have bucket and object ACL of the GCS bucket.

Is there any configuration I should try?
Reply all
Reply to author
Forward
0 new messages