Debian Wheezy (7.x) on AWS EC2

You may wish to use the CloudFormation template and launch your instance with some smart UserData scripts. For some releases you are free to choose the AWS Marketplace AMI, or the AMI that exists in the Debian AMI Account (account number 379101102735). All AMIs shared from the Debian AWS Account and their corresponding EBS snapshots are marked as public so can be inspected by any other AWS user.

SSH username

In line with the security of most Linux distributions on Amazon Web Services, remote root SSH is disabled (as is password authentication). You will need to connect to instances from this AMI as the user admin using your SSH key, and then sudo -i to gain root access.

Please note that a Marketplace image volume cannot be attached to another running instance (For example, to repair a broken /etc/fstab, or /etc/network/interfaces). This is a limitation of all Marketplace images, as described here: Official AWS documentation


7.7

Region

hvm x86_64 ebs

paravirtual i386 ebs

paravirtual x86_64 ebs

paravirtual x86_64 instance-store

ap-northeast-1

ami-5b4e715a

ami-970b3a96

ami-0f0f3e0e

ami-21f6c720

ap-southeast-1

ami-6a674438

ami-4e20011c

ami-70220322

ami-24240576

ap-southeast-2

ami-1f335c25

ami-0185e83b

ami-bd87ea87

ami-e386ebd9

eu-west-1

ami-46cc6631

ami-c664cbb1

ami-9c62cdeb

ami-187fd06f

eu-central-1

ami-90d9ef8d

ami-522a1c4f

ami-4c2a1c51

ami-4a2a1c57

sa-east-1

ami-632e997e

ami-3f7dc922

ami-a97dc9b4

ami-417eca5c

us-east-1

ami-5ae66932

ami-0258e26a

ami-2058e248

ami-bc4af0d4

us-west-1

ami-b12e39f4

ami-c53d2880

ami-893c29cc

ami-4b3e2b0e

us-west-2

ami-87367eb7

ami-677e3157

ami-df7c33ef

ami-ff7a35cf

us-gov-west-1

ami-ab620488

ami-030e6820

ami-3d0e681e

-

cn-north-1

ami-3072e009

-

ami-e44ad8dd

-

To get started with Wheezy 7.7 using Amazon Cloud Formation have a look at this CloudFormation example


Upgrading from previous 6.x.y releases

As is standard with Debian, a simple apt-get update && apt-get dist-upgrade should bring all packages up to date. There is no need to reinstall, but any ?CloudFormation templates and ?AutoScale Launch Configurations should be tested with and then updated to use the current AMI. It is recommended not to use older point releases.

CloudFormation Template

CloudFormation is a templating system for defining AWS resources - see http://aws.amazon.com/cloudformation/

{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Debian AMI list, generated 2014-10-27 14:31:41.085276 by James Bromberger, jeb@debian.org",
    "Mappings": {
        "AMImap": {
            "ap-northeast-1": {
                "Wheezy77basei386paravirtualebs": "ami-970b3a96",
                "Wheezy77basex8664hvmebs": "ami-97f1c096",
                "Wheezy77basex8664paravirtualebs": "ami-0f0f3e0e",
                "Wheezy77basex8664paravirtualinstancestore": "ami-21f6c720"
            },
            "ap-southeast-1": {
                "Wheezy77basei386paravirtualebs": "ami-4e20011c",
                "Wheezy77basex8664hvmebs": "ami-d822038a",
                "Wheezy77basex8664paravirtualebs": "ami-70220322",
                "Wheezy77basex8664paravirtualinstancestore": "ami-24240576"
            },
            "ap-southeast-2": {
                "Wheezy77basei386paravirtualebs": "ami-0185e83b",
                "Wheezy77basex8664hvmebs": "ami-ed87ead7",
                "Wheezy77basex8664paravirtualebs": "ami-bd87ea87",
                "Wheezy77basex8664paravirtualinstancestore": "ami-e386ebd9"
            },
            "eu-west-1": {
                "Wheezy77basei386paravirtualebs": "ami-c664cbb1",
                "Wheezy77basex8664hvmebs": "ami-e261ce95",
                "Wheezy77basex8664paravirtualebs": "ami-9c62cdeb",
                "Wheezy77basex8664paravirtualinstancestore": "ami-187fd06f"
            },
            "sa-east-1": {
                "Wheezy77basei386paravirtualebs": "ami-3f7dc922",
                "Wheezy77basex8664hvmebs": "ami-fd7dc9e0",
                "Wheezy77basex8664paravirtualebs": "ami-a97dc9b4",
                "Wheezy77basex8664paravirtualinstancestore": "ami-417eca5c"
            },
            "us-east-1": {
                "Wheezy77basei386paravirtualebs": "ami-0258e26a",
                "Wheezy77basex8664hvmebs": "ami-a458e2cc",
                "Wheezy77basex8664paravirtualebs": "ami-2058e248",
                "Wheezy77basex8664paravirtualinstancestore": "ami-bc4af0d4"
            },
            "us-west-1": {
                "Wheezy77basei386paravirtualebs": "ami-c53d2880",
                "Wheezy77basex8664hvmebs": "ami-6f3f2a2a",
                "Wheezy77basex8664paravirtualebs": "ami-893c29cc",
                "Wheezy77basex8664paravirtualinstancestore": "ami-4b3e2b0e"
            },
            "us-west-2": {
                "Wheezy77basei386paravirtualebs": "ami-677e3157",
                "Wheezy77basex8664hvmebs": "ami-af7b349f",
                "Wheezy77basex8664paravirtualebs": "ami-df7c33ef",
                "Wheezy77basex8664paravirtualinstancestore": "ami-ff7a35cf"
            }
        }
    },
    "Parameters": {
        "InstanceType": {
            "AllowedPattern": "[a-z]+[0-9].[a-z0-9]+",
            "Default": "m3.medium",
            "Description": "Type of EC2 Instance",
            "Type": "String"
        },
        "KeyName": {
            "Description": "SSH Key Name",
            "Type": "String"
        },
        "Release": {
            "AllowedValues": [
                "Wheezy77basei386paravirtualebs",
                "Wheezy77basex8664hvmebs",
                "Wheezy77basex8664paravirtualebs",
                "Wheezy77basex8664paravirtualinstancestore"
            ],
            "Default": "Wheezy75basex8664paravirtualebs",
            "Description": "Release, arch and root filesystem type",
            "Type": "String"
        }
    },
    "Resources": {
        "MyInstance": {
            "Properties": {
                "ImageId": {
                    "Fn::FindInMap": [
                        "AMImap",
                        {
                            "Ref": "AWS::Region"
                        },
                        {
                            "Ref": "Release"
                        }
                    ]
                },
                "InstanceType": {
                    "Ref": "InstanceType"
                },
                "KeyName": {
                    "Ref": "KeyName"
                },
                "SecurityGroups": [
                    {
                        "Ref": "MySecurityGroup"
                    }
                ]
            },
            "Type": "AWS::EC2::Instance"
        },
        "MySecurityGroup": {
            "Properties": {
                "GroupDescription": "Permit inbound SSH",
                "SecurityGroupIngress": [
                    {
                        "CidrIp": "0.0.0.0/0",
                        "FromPort": "22",
                        "IpProtocol": "tcp",
                        "ToPort": "22"
                    }
                ]
            },
            "Type": "AWS::EC2::SecurityGroup"
        }
    }
}

Suggested UserData scripts

As of the 7.3 release, the official Debian !AMIs now support cloud-init. This means you have much more flexability (and power) in what you cna put in your UserData to get your instance to configure. For example, a simple shell script that starts with #!/bin/sh will be executed as previously - so you can chose to enable auto update with the following UserData scripts:

   1 #!/bin/sh
   2 apt-get update && apt-get upgrade -y && apt-get install -y unattended-upgrades python-pip

The unattended-upgrades package is described on UnattendedUpgrades.

Some feature bugs may persist in Cloud-init in Debian 7.3 AMIs; no functionality has been lost, but it appears not all cloud-init directives can be used. Eg: packages, ssh-import-id, apt_update, apt-upgrade.


See also Cloud and Teams/Cloud.