File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Monitoring/auto-add-cw-alarms Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 2727################################################################################
2828#
2929# Define which SNS topic you want "volume full" message to be sent to.
30- SNStopic = 'keith-volume-full '
30+ SNStopic = ''
3131#
3232# Provide the account id the SNS topic resides under:
3333# MUST be a string.
34- accountId = '759995470648 '
34+ accountId = ''
3535#
3636# Set the customer ID associated with the AWS account. This is used to
3737# as part of the alarm name prefix so a customer ID can be associated
@@ -234,6 +234,14 @@ def lambda_handler(event, context):
234234 if customerId != '' :
235235 customerId = f", CustomerID: { customerId } "
236236
237+ if len (SNStopic ) == 0 :
238+ raise Exception ("You must specify a SNS topic to send the alarm messages to." )
239+ return
240+
241+ if len (accountId ) == 0 :
242+ raise Exception ("You must specify an accountId to run this program." )
243+ return
244+
237245 if len (regions ) == 0 :
238246 ec2Client = boto3 .client ('ec2' )
239247 ec2Regions = ec2Client .describe_regions ()['Regions' ]
You can’t perform that action at this time.
0 commit comments