Skip to content

Commit

Permalink
fix(kms): add proxy support to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
wyvern8 committed Jun 28, 2018
1 parent eb7ec74 commit fb8e246
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/KmsUtils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import * as AWS from 'aws-sdk';
const proxy = require('proxy-agent');
if (process.env.AWS_PROXY) {
AWS.config.update({
httpOptions: {
agent: proxy(process.env.AWS_PROXY)
}
});
}

class KmsUtils {
constructor() {
Expand Down
1 change: 1 addition & 0 deletions src/serverless/gtmGithubHook/gtmGithubHook.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

console.log('cold start');
require('source-map-support').install();
let rp = require('request-promise-native');
let json = require('format-json');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

console.log('cold start');
const AWS = require('aws-sdk');
const HTTPS = require('https');
const PROXY_AGENT = require('https-proxy-agent');
Expand Down
1 change: 1 addition & 0 deletions src/serverless/gtmGithubResults/gtmGithubResults.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

console.log('cold start');
require('source-map-support').install();
let json = require('format-json');
let consumer = require('sqs-consumer');
Expand Down

0 comments on commit fb8e246

Please sign in to comment.