Stack Notifications Disabled
- Query id: 837e033c-4717-40bd-807e-6abaa30161b7
- Query name: Stack Notifications Disabled
- Platform: CloudFormation
- Severity: Medium
- Category: Observability
- URL: Github
Description¶
AWS CloudFormation should have stack notifications enabled to be notified when an event occurs
Documentation
Code samples¶
Code samples with security vulnerabilities¶
Positive test num. 1 - yaml file
AWSTemplateFormatVersion: '2010-09-09'
Resources:
myStackWithParams:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/cloudformation-templates-us-east-2/EC2ChooseAMI.template
Parameters:
InstanceType: t1.micro
KeyName: mykey
Positive test num. 2 - json file
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"myStackWithParams": {
"Type": "AWS::CloudFormation::Stack",
"Properties": {
"TemplateURL": "https://s3.amazonaws.com/cloudformation-templates-us-east-2/EC2ChooseAMI.template",
"Parameters": {
"InstanceType": "t1.micro",
"KeyName": "mykey"
}
}
}
}
}
Code samples without security vulnerabilities¶
Negative test num. 1 - yaml file
AWSTemplateFormatVersion: '2010-09-09'
Resources:
myStackWithParams:
Type: AWS::CloudFormation::Stack
Properties:
NotificationARNs:
- "String"
TemplateURL: https://s3.amazonaws.com/cloudformation-templates-us-east-2/EC2ChooseAMI.template
Parameters:
InstanceType: t1.micro
KeyName: mykey
Negative test num. 2 - json file
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"myStackWithParams": {
"Type": "AWS::CloudFormation::Stack",
"Properties": {
"NotificationARNs": [
"string"
],
"TemplateURL": "https://s3.amazonaws.com/cloudformation-templates-us-east-2/EC2ChooseAMI.template",
"Parameters": {
"InstanceType": "t1.micro",
"KeyName": "mykey"
}
}
}
}
}