Skip to content

Instantly share code, notes, and snippets.

@nickjacob
Created July 30, 2016 17:31
Show Gist options
  • Save nickjacob/acc3694e624f42a05db3b3829304330d to your computer and use it in GitHub Desktop.
Save nickjacob/acc3694e624f42a05db3b3829304330d to your computer and use it in GitHub Desktop.
Using ember-cli-deploy-s3 with Google Cloud Storage
// you can use Google Cloud storage's interoperability functionality
// to use the standard aws-sdk adapter in ember-cli-deploy-s3.
module.exports = function(deployTarget) {
// make your own client so yo ucan set the 'endpoint' to google
var googUploadClient = new AWS.S3({
endpoint: 'https://storage.googleapis.com',
accessKeyId: process.env.GOOGLE_ACCESS_KEY,
secretAccessKey: process.env.GOOGLE_SECRET_KEY,
bucket: '< your bucket name >',
region: 'us-east-1', // won't affect anything in google cloud
signatureVersion: 's3', // the default is v4 -- google expects the "s3" signing method
});
var ENV = {
build: {},
redis: {
allowOverwrite: true,
keyPrefix: '< your prefix >'
},
s3: {
prefix: 'frontend',
s3Client: googUploadClient,
bucket: '<your bucket name>',
accessKeyId: process.env.GOOGLE_ACCESS_KEY,
secretAccessKey: process.env.GOOGLE_SECRET_KEY,
},
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment