I need to access a json file in GCS (Google Cloud Storage) and change its content from Google App Engine (PY3 standard runtime). Though I can read the content of the file in GCS by:
from google.cloud import storage
storage_client = storage.Client()
bucket = storage_client.bucket('bucket_name')
blob = bucket.blob('file_name')
file_content = blob.download_as_string().decode('utf-8')
I don't know how to write directly to the GCS file. It is also okay if I can delete the GCS file and re-upload one created in some temp folder, but it looks GAE file system is read-only and I cannot create files on the server side. Could you help me? Thank you very much!