Proof of Concept for use AWS S3 for Nodejs to connect to Google Storage using using Cloud Storage HMAC keys
Prerequisites is to have a Billing Account on Google Cloud Platoform
npm install
Go to Google Storage Setting > Interoperability > Create a key for a service account
Generate a key id and a secret:
In alternative it is possible use gcloud command:
gsutil hmac create ${SERVICE_ACCOUNT}
Access ID: GOOG1********
Secret: x5X_*********
Copy the access key and the secret an put it in a file called .env:
GOOGLE_KEY_ID = 'GOOG1***'
GOOGLE_SECRET_KEY_ID = 'x5X_***'
BUCKET = 'PROJECTID.appspot.com'
REGION = '<REGION_OF_BUCKET>'
At this point launch the program:
npm start