Accessing Google Cloud Store from Google App Engine

585 views Asked by At

I am trying to access Google Cloud Storage from my Google App Engine Java App:

GcsService gcsService = GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance());
GcsFilename writableFilename = new GcsFilename(Constants.CONTENT_BUCKET, "some-id");
                GcsFileOptions options = new GcsFileOptions.Builder()
                        .mimeType("some-content-type")
                        .acl("private")
                        .addUserMetadata("x-goog-project-id", "some-id")
                        .build();
                GcsOutputChannel writeChannel = gcsService.createOrReplace(writableFilename, options);

But when I deploy it and test it, I receive

<?xml version='1.0' encoding='UTF-8'?><Error><Code>AccessDenied</Code><Message>Access denied.</Message><Details>keys-expressflow</Details></Error>

as response. So, I checked the ACLs in my Google API console. And now begins the quirks: When I try to grant access to my bucket by adding a team-member through the team panel of my Google API console, I am redirected to my Google App Engine Administration console.

Anybody having an idea what is going on here?

Even more interesting: This happens since yesterday, without changing any configuration. Did Google change anything and does somebody else experience such behaviour?

UPDATE

After setting the ACLs accordingly like described in https://developers.google.com/appengine/docs/python/googlestorage/ by the use of gsutil the problem still persists. But now the response changed:

Service Unavailable

Faces Google Cloud Storage currently some technical problems?

This post might somehow related to Unable to give Google App Engine Service Account access to Google Cloud Storage

I redeployed the whole application to US-based locations (Google App Engine App and Cloud Store Buckets). And guess what? Now it works.

Google, fix this!!!

0

There are 0 answers