From 8cab62f3cd95666924b70efb0e5a64bec79c4d32 Mon Sep 17 00:00:00 2001 From: Patrick Robinson Date: Tue, 12 Sep 2023 10:40:50 +0200 Subject: [PATCH] Remove trusted advisor Signed-off-by: Patrick Robinson --- .gitignore | 3 +++ lib/cdk-opswatch-metric-stream-stack.ts | 32 ------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 3a6e9d9..f400d6d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ package-lock.json # CDK asset staging directory .cdk.staging cdk.out + +.DS_Store +.vscode \ No newline at end of file diff --git a/lib/cdk-opswatch-metric-stream-stack.ts b/lib/cdk-opswatch-metric-stream-stack.ts index d2de6b0..f8f0eb4 100644 --- a/lib/cdk-opswatch-metric-stream-stack.ts +++ b/lib/cdk-opswatch-metric-stream-stack.ts @@ -142,37 +142,5 @@ export class CdkOpswatchMetricStreamStack extends Stack { namespace: 'TrustedAdvisor' }] }); - const topic = new sns.CfnTopic(this, 'TrustedAdvisorTopic', { - topicName: 'trusted_advisor' - }); - const topic_policy = new sns.CfnTopicPolicy(this, 'TrustedAdvisorTopicPolicy', { - topics: [Fn.join('', [ - 'arn:aws:sns:', - Stack.of(this).region, - ':', - Stack.of(this).account, - ':', - topic.attrTopicName - ])], - policyDocument: new iam.PolicyDocument({ - statements: [new iam.PolicyStatement({ - actions: ['SNS:Publish'], - principals: [new iam.ServicePrincipal('events.amazonaws.com')], - resources: ['*'] - })] - }) - }); - const subscription = new sns.CfnSubscription(this, 'TrsutedAdvisorSubscription', { - topicArn: Fn.join('', [ - 'arn:aws:sns:', - Stack.of(this).region, - ':', - Stack.of(this).account, - ':', - topic.attrTopicName - ]), - endpoint: param_file_content.url + '/trusted_advisor', - protocol: sns.SubscriptionProtocol.HTTPS - }); } }