AI CloudAdvisor (Beta)

My Presets

You must be logged in to save or view your saved configuration templates

Security Controls

Service Control PoliciesConfig RulesCloudWatch Alarms and Event RulesCloudFormation Guard RulesLogging & Monitoring ConfigurationsBackups & DRAuto Remediation RulesConformance PacksBilling and Cost ManagementS3 Bucket PoliciesSecurity Groups & NACLsIAM PoliciesVPC Endpoint Policies

AWS Services

Guided Walkthroughs

Configuration Packages

Reference Guides

Other

AI CloudAdvisor (Beta)

Configuration Stack
0

My Presets

Security Controls

AWS Services

Guided Walkthroughs

Configuration Packages

Reference Guides

Other

EC2 Security Controls

EC2 Instance

Configuration template to deploy an Amazon EC2 instance with customizable settings that include Instance Metadata Service (IMDS) settings, volume and interface settings, name tag, key pairs, user data, and more.

The following settings are available in this template:

  • Instance Image (AMI): Deploy a custom AMI (based on AMI ID provided) or dynamically pull the latest AMI for Amazon Linux 2, Windows, or Ubuntu
  • Instance Type: Specify instance size (e.g. Memory and CPU settings) based on the instance type
  • EC2 Launch Template: Specify launch template id and version to import configuration details
  • Instance Metadata Service (IMDS): Enforce IMDSv2 or allow both IMDS v1 and v2 (CloudFormation requires the creation of a Launch Template to enable this setting)
  • Subnet Id: Subnet Id for the instance to be launched in (this setting applies to the first network interface attached)
  • Assign Public IP: Default is to inherit the subnet's settings but can be modified to force enable or disable public IP assignment
  • Customize EBS Volumes: By default one EBS volume is attached, but more can be added with settings that include: volume type, volume size, device name, encryption key, and more
  • Customize Network Interfaces (ENIs): By default one interface is attached, but more interfaces can be added with settings that include: subnet Id, static IP address, security group(s), description, and more
  • (Optional) Instance Name: Set a tag key for the instance name
  • (Optional) SSH Key: Provide the name for a pre-existing Key Pair
  • (Optional) User Data: Provide commands (Windows or Linux) to be run at the time of instance launch
Try out CloudAdvisor: Your AI-Powered Assistant for AWS Cloud

Items
2
Size
0.8 KB
Missing Parameters
AWSTemplateFormatVersion: '2010-09-09'
Description: ''
Resources:
  LaunchTemplate:
    Type: 'AWS::EC2::LaunchTemplate'
    Properties:
      LaunchTemplateData:
        MetadataOptions:
          HttpTokens: required
  Ec2Instance:
    Type: 'AWS::EC2::Instance'
    Properties:
      ImageId:
        Ref: amazon2
      InstanceType: t2.micro
      BlockDeviceMappings:
        - DeviceName: /dev/xvda
          Ebs:
            VolumeSize: 32
            DeleteOnTermination: true
            VolumeType: gp3
      LaunchTemplate:
        LaunchTemplateId:
          Ref: LaunchTemplate
        Version: '1'
Parameters:
  amazon2:
    Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>'
    Default: /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2
Metadata: {}
Conditions: {}

Actions



Customize Template


* Required field

Upgrade to Premium for More Features
Sign up

Guided Walkthroughs
Step-by-step configuration wizards for your environment
Dedicated Security Account
AWS Backup Strategy
VPC Connectivity Setup
Automated Patching
All Guides
Configuration Packages
Pre-built packages for common configuration
Common SCPs
CloudFormation Guard Rules
Auto Remediation Rules
IAM Monitoring & Compliance
All Packages
Automated Assessments
  • 350+ security checks
  • Well-architected reviews
  • Detailed compliance reports
  • Remediation templates
  • Email summaries
  • Learn more