AMI

Definition

An Amazon Machine Image (AMI) is a pre-configured virtual appliance used to create a virtual machine within the Amazon Elastic Compute Cloud (EC2). It includes an operating system, application server, and applications necessary to launch an instance. AMIs are fundamental to deploying scalable and consistent environments in AWS, allowing users to create multiple instances with identical configurations.

Secure Settings Example

{
  "ImageId": "ami-12345678",
  "InstanceType": "t2.micro",
  "SecurityGroupIds": ["sg-01234567"],
  "KeyName": "my-secure-key",
  "IamInstanceProfile": {
    "Arn": "arn:aws:iam::123456789012:instance-profile/SecureInstanceProfile"
  },
  "BlockDeviceMappings": [
    {
      "DeviceName": "/dev/sda1",
      "Ebs": {
        "VolumeSize": 30,
        "DeleteOnTermination": true,
        "Encrypted": true
      }
    }
  ]
}

Insecure Settings Example

{
  "ImageId": "ami-12345678",
  "InstanceType": "t2.micro",
  "SecurityGroupIds": ["sg-01234567"],
  "KeyName": "my-insecure-key",
  "IamInstanceProfile": {
    "Arn": "arn:aws:iam::123456789012:instance-profile/InsecureInstanceProfile"
  },
  "BlockDeviceMappings": [
    {
      "DeviceName": "/dev/sda1",
      "Ebs": {
        "VolumeSize": 30,
        "DeleteOnTermination": false,
        "Encrypted": false
      }
    }
  ]
}