Skip to content

Commit

Permalink
Merge pull request #92 from zotoio/feature/s3
Browse files Browse the repository at this point in the history
feat(s3): add storage location for future
  • Loading branch information
wyvern8 authored Apr 12, 2018
2 parents d302c4a + 0e3b2d9 commit 1d020f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .envExample
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ GTM_TASK_CONFIG_DEFAULT_MESSAGE_PATH=
GTM_DYNAMO_TABLE_EVENTS=GtmEvents
GTM_AWS_VPC_ID=<redacted>
GTM_BASE_URL=http://localhost:9091
GTM_S3_BUCKET=gtmstorage
6 changes: 6 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ resources:
StreamSpecification:
StreamViewType: NEW_IMAGE

GtmS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${env:GTM_S3_BUCKET}
# add additional custom bucket configuration here

# DynamoVpcEndpoint:
# Type: AWS::EC2::VPCEndpoint
# Properties:
Expand Down
4 changes: 2 additions & 2 deletions src/agent/AgentLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let STREAM_USER_LAST_ACTIVITY = Date.now();
let logGroupMap = [];
logGroupMap['gtmGithubHook'] = '/aws/lambda/gtmGithubHook-dev-gtmGithubHook';
logGroupMap['gtmGithubResults'] = '/aws/lambda/gtmGithubHook-dev-gtmGithubResults';
logGroupMap[process.env.GTM_AGENT_CLOUDWATCH_LOGS_GROUP] = process.env.GTM_AGENT_CLOUDWATCH_LOGS_GROUP;
logGroupMap['gtmAgent'] = process.env.GTM_AGENT_CLOUDWATCH_LOGS_GROUP || 'gtmAgent';

let CWLogFilterEventStream = require('smoketail').CWLogFilterEventStream;
let janitorInterval;
Expand All @@ -40,7 +40,7 @@ function create(agentId) {
}

let cloudWatchStream = new CWLogsWritable({
logGroupName: process.env.GTM_AGENT_CLOUDWATCH_LOGS_GROUP || 'gtmAgent',
logGroupName: logGroupMap['gtmAgent'],
logStreamName: 'AGENT_ID=' + agentId,
cloudWatchLogsOptions: CWLogOptions
}).on('error', console.error);
Expand Down

0 comments on commit 1d020f8

Please sign in to comment.