Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
remove cdk-watchful DynamoDB stuff because we use on-demand pricing
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrillo-grapl committed Jun 26, 2020
1 parent beeb7f5 commit 10ee28f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/js/grapl-cdk/lib/grapl-cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class NodeIdentifier extends cdk.Construct {
) {
super(scope, id);

const history_db = new HistoryDb(this, 'graplhistorydb', watchful);
const history_db = new HistoryDb(this, 'graplhistorydb');

const unid_subgraphs = new EventEmitter(this, prefix + '-unid-subgraphs-generated');
this.bucket = unid_subgraphs.bucket;
Expand Down Expand Up @@ -533,7 +533,7 @@ export class GraplCdkStack extends cdk.Stack {
secretName: 'EdgeJwtSecret',
});

const user_auth_table = new UserAuthDb(this, 'UserAuthTable', watchful);
const user_auth_table = new UserAuthDb(this, 'UserAuthTable');

const analyzers_bucket = new s3.Bucket(this, prefix + '-analyzers-bucket', {
bucketName: prefix + '-analyzers-bucket',
Expand Down
20 changes: 1 addition & 19 deletions src/js/grapl-cdk/lib/historydb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import * as dynamodb from "@aws-cdk/aws-dynamodb";
import { Service } from "./service";
import { RemovalPolicy } from "@aws-cdk/core";

import { Watchful } from "./vendor/cdk-watchful/lib/watchful";

function create_table(
scope: cdk.Construct,
name: string,
Expand Down Expand Up @@ -38,29 +36,16 @@ export class HistoryDb extends cdk.Construct {
readonly dynamic_session_table: dynamodb.Table;
readonly static_mapping_table: dynamodb.Table;

constructor(scope: cdk.Construct, id: string, watchful: Watchful) {
constructor(scope: cdk.Construct, id: string) {
super(scope, id);

this.proc_history = create_table(this, 'process_history_table');
// watchful.watchDynamoTable(this.proc_history.tableName, this.proc_history);

this.file_history = create_table(this, 'file_history_table');
// watchful.watchDynamoTable(this.file_history.tableName, this.file_history);

this.outbound_connection_history = create_table(this, 'outbound_connection_history_table');
// watchful.watchDynamoTable(this.outbound_connection_history.tableName, this.outbound_connection_history);

this.inbound_connection_history = create_table(this, 'inbound_connection_history_table');
// watchful.watchDynamoTable(this.inbound_connection_history.tableName, this.inbound_connection_history);

this.network_connection_history = create_table(this, 'network_connection_history_table');
// watchful.watchDynamoTable(this.network_connection_history.tableName, this.network_connection_history);

this.ip_connection_history = create_table(this, 'ip_connection_history_table');
// watchful.watchDynamoTable(this.ip_connection_history.tableName, this.ip_connection_history);

this.dynamic_session_table = create_table(this, 'dynamic_session_table');
// watchful.watchDynamoTable(this.dynamic_session_table.tableName, this.dynamic_session_table);

this.asset_history = new dynamodb.Table(this, 'asset_id_mappings', {
tableName: "asset_id_mappings",
Expand All @@ -75,7 +60,6 @@ export class HistoryDb extends cdk.Construct {
billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,
removalPolicy: RemovalPolicy.DESTROY,
});
// watchful.watchDynamoTable(this.asset_history.tableName, this.asset_history);

this.static_mapping_table = new dynamodb.Table(this, 'static_mapping_table', {
tableName: "static_mapping_table",
Expand All @@ -86,7 +70,6 @@ export class HistoryDb extends cdk.Construct {
billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,
removalPolicy: RemovalPolicy.DESTROY,
});
// watchful.watchDynamoTable(this.static_mapping_table.tableName, this.static_mapping_table);

this.node_id_retry_table = new dynamodb.Table(this, 'node_id_retry_table', {
tableName: "node_id_retry_table",
Expand All @@ -98,7 +81,6 @@ export class HistoryDb extends cdk.Construct {
timeToLiveAttribute: "ttl_ts",
removalPolicy: RemovalPolicy.DESTROY,
});
// watchful.watchDynamoTable(this.node_id_retry_table.tableName, this.node_id_retry_table);
}

allowReadWrite(service: Service) {
Expand Down
7 changes: 1 addition & 6 deletions src/js/grapl-cdk/lib/userauthdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ import * as iam from "@aws-cdk/aws-iam";
import { Service } from "./service"
import { RemovalPolicy } from "@aws-cdk/core";

import { Watchful } from "./vendor/cdk-watchful/lib/watchful";

export class UserAuthDb extends cdk.Construct {
readonly user_auth_table: dynamodb.Table;

constructor(
scope: cdk.Construct,
id: string,
watchful: Watchful
id: string
) {
super(scope, id);

Expand All @@ -27,8 +24,6 @@ export class UserAuthDb extends cdk.Construct {
billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,
removalPolicy: RemovalPolicy.DESTROY,
});

// watchful.watchDynamoTable(this.user_auth_table.tableName, this.user_auth_table);
}

allowRead(service: Service) {
Expand Down

0 comments on commit 10ee28f

Please sign in to comment.