

# ec2-instance-launched-with-allowed-ami
<a name="ec2-instance-launched-with-allowed-ami"></a>

Checks if running or stopped EC2 instances were launched with Amazon Machine Images (AMIs) that meet your Allowed AMIs criteria. The rule is NON\$1COMPLIANT if an AMI doesn't meet the Allowed AMIs criteria and the Allowed AMIs settings isn't disabled. 



**Identifier:** EC2\$1INSTANCE\$1LAUNCHED\$1WITH\$1ALLOWED\$1AMI

**Resource Types:** AWS::EC2::Instance

**Trigger type:** Configuration changes and Periodic

**Amazon Web Services Region:** All supported Amazon regions

**Parameters:**

InstanceStateNameList (Optional)Type: CSV  
Comma-separate list of Amazon EC2 instance states for the rule to check. Valid values are "running" and "stopped".

## Amazon CloudFormation template
<a name="w2aac20c16c17b7d551c19"></a>

To create Amazon Config managed rules with Amazon CloudFormation templates, see [Creating Amazon Config Managed Rules With Amazon CloudFormation Templates](aws-config-managed-rules-cloudformation-templates.md).