Skip to content

Create a Google Storage Update in NodeJs with AWS S3

Notifications You must be signed in to change notification settings

EnricoFerro/GoogleAWS3

Repository files navigation

Create a Google Storage Update in NodeJs with AWS S3

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

Launch

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 

About

Create a Google Storage Update in NodeJs with AWS S3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published