Search code examples
amazon-web-servicesamazon-ec2amazon-ebs

Amazon EC2 ebs vs gp2 ami


It's probably a silly question, but I can't understand the difference between these 2 amazon linux 2 amis:

  • ami-7105540e amzn2-ami-hvm-2.0.20180622.1-x86_64-ebs
  • ami-b70554c8 amzn2-ami-hvm-2.0.20180622.1-x86_64-gp2

Judging by this article, isn't gp2 just another ebs instance type?


Solution

  • The question isn't silly at all. In fact AWS's lack of documentation explaining the actual difference between the two is a bit surprising

    TLDR;

    If you're planning on switching to a faster SSD root volume at some point in the future but want to use Magnetic for now it would be better to use the gp2 version of the AMI and then change the root volume to SSD sometime later

    Some more Explanation

    • ami-b70554c8 amzn2-ami-hvm-2.0.20180622.1-x86_64-gp2 - The recommended root volume type is General Purpose SSD (gp2)
    • ami-7105540e amzn2-ami-hvm-2.0.20180622.1-x86_64-ebs - The recommended root volume type is Magnetic

    However this isn't set in stone so you can still interchange between them (I've used the gp2 version with a Magnetic storage in the past without any issues)

    I couldn't find any official documentation as to the actual difference between the two AMI versions but the gp2 version most likely has SSD related optimizations added already to the OS

    So if you envision switching to SSD at some point in future but want to start with a Magnetic volume it might be better to just use the gp2 optimized AMI right from the start. It probably has some optimizations not relevant to Magnetic volumes but it might be more future proof in case you want to have a faster root volume later