-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathta-alarms.template.yml
60 lines (54 loc) · 1.8 KB
/
ta-alarms.template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
AWSTemplateFormatVersion: 2010-09-09
Description: CloudWatch Alarms for Exposed Access Keys trigger in Trusted Advisor
Parameters:
SNSTopicArn:
Description: SNS Topic deployed for sending notifications of alarms
Type: String
MinLength: 1
Resources:
##############################
## Trusted Advisor Alarms
##############################
TAExposedAccessKeysYellowAlarm:
## https://docs.aws.amazon.com/awssupport/latest/user/trusted-advisor-check-reference.html#exposed-access-keys
Type: AWS::CloudWatch::Alarm
Properties:
AlarmName: Exposed Access Keys (Trusted Advisor - Yellow)
AlarmDescription: "Exposed Access Keys"
Namespace: AWS/TrustedAdvisor
MetricName: YellowResources
Dimensions:
- Name: 'CheckName'
Value: 'Exposed IAM Access Keys Found'
ComparisonOperator: GreaterThanOrEqualToThreshold
EvaluationPeriods: 1
Period: 60
Statistic: Sum
Threshold: 1
TreatMissingData: notBreaching
AlarmActions:
- !Ref SNSTopicArn
OKActions:
- !Ref SNSTopicArn
TAExposedAccessKeysRedAlarm:
## https://docs.aws.amazon.com/awssupport/latest/user/trusted-advisor-check-reference.html#exposed-access-keys
Type: AWS::CloudWatch::Alarm
Properties:
AlarmName: Exposed Access Keys (Trusted Advisor - Red)
AlarmDescription: "Exposed IAM Access Keys Found"
Namespace: AWS/TrustedAdvisor
MetricName: RedResources
Dimensions:
- Name: 'CheckName'
Value: 'Exposed Access Keys'
ComparisonOperator: GreaterThanOrEqualToThreshold
EvaluationPeriods: 1
Period: 60
Statistic: Sum
Threshold: 1
TreatMissingData: notBreaching
AlarmActions:
- !Ref SNSTopicArn
OKActions:
- !Ref SNSTopicArn