title: aws CloudFormation AWS::EC2::Instance BlockDeviceMappings and Volumes
body: <p>I am sort of confused about two AWS::EC2::Instance properties:
  <code>BlockDeviceMappings</code> and <code>Volumes</code>.</p>
  
  <p>I have read documentation a number of times but still don't really understand the difference.</p>
  
  <p>Here is my template:</p>
  
  <pre><code> {
   "AWSTemplateFormatVersion" : "2010-09-09",
  
   "Description" : "kappoowTest",
  
   "Mappings" : {
       "AmazonLinuxAMI" : {
           "eu-west-1" :
               { "AMI" : "ami-d8f9f1ac" },
           "us-west-1" :
               { "AMI" : "ami-b63210f3" }
       }
   },
  
   "Resources" : {
       "SomeInstance" :{
           "Type" : "AWS::EC2::Instance",
           "Properties" : {
               "AvailabilityZone" : "eu-west-1a",
               "BlockDeviceMappings" : [
                   {
                       "DeviceName" : "/dev/sdc",
                       "Ebs" : { "VolumeSize" : "50" }
                   },
                   {
                       "DeviceName" : "/dev/sdd",
                       "Ebs" : { "VolumeSize" : "100" }
                   }
               ],
               "DisableApiTermination" : "true",
               "EbsOptimized" : "true",
               "ImageId" : { "Fn::FindInMap" : [ "AmazonLinuxAMI", { "Ref" : "AWS::Region" }, "AMI" ]},
               "InstanceType" : "m1.large",
               "KeyName" : "mongo_test",
               "Monitoring" : "true",
               "SecurityGroups" : [ "default" ],
               "Volumes" : [
                   { "VolumeId" : { "Ref" : "NewVolume" }, "Device" : "/dev/sdk" }
               ]
           }
       },
  
       "NewVolume" : {
           "Type" : "AWS::EC2::Volume",
           "Properties" : {
               "Size" : "100",
               "AvailabilityZone" : "eu-west-1a"
           }
       }
   }}
  </code></pre>
  
  <p>Here I have created 3 volumes. 2 with </p>
  
  <pre><code> "BlockDeviceMappings" : [
                   {
                       "DeviceName" : "/dev/sdc",
                       "Ebs" : { "VolumeSize" : "50" }
                   },
                   {
                       "DeviceName" : "/dev/sdd",
                       "Ebs" : { "VolumeSize" : "100" }
                   }
               ]
  </code></pre>
  
  <p>and another one with:</p>
  
  <pre><code>"Volumes" : [
      { "VolumeId" : 
            { "Ref" : "NewVolume" }, "Device" : "/dev/sdk" }
   ]
  </code></pre>
  
  <p>CloudFormation ran fine, but I fail to see the difference. </p>
  
  <p>Could someone tell me what which way is better of adding EBS volumes to EC2 instance and what is the difference between these two methods ?</p>