aws cli run-instances block-device-mappings ephemeral encrypted

aws --version => aws-cli/1.1.1 Python/2.6.8 Linux/3.4.43-43.43.amzn1.x86_64
  1. aws ec2 run-instances 
    1. --image-id 
      1. ami-eeff1122 
    2. --instance-type 
      1. m2.2xlarge 
    3. --security-group-ids 
      1. sg-eeff1122
    4. --subnet-id 
      1. subnet-eeff1122
    5. --private-ip-address 
      1. 10.0.0.2
    6. --user-data 
      1. file://meta_myserver.txt 
    7. --block-device-mappings 
      1. '[{ "DeviceName":"/dev/sdb", "VirtualName":"ephemeral0" }]'
For 50G EBS attached on boot (auto-deleted on terminate unless you override), block device mapping becomes:
  1.  '[{ "DeviceName":"/dev/sdb", "VirtualName":"ephemeral0" },{"DeviceName":"/dev/sdc","Ebs":{"VolumeSize":50}}]'
WARNING: "Ebs" is very case sensitive here.

To encrypt the Ebs volume, add "Encrypted": true to the device params like so:
  1.  {"DeviceName":"/dev/sdc","Ebs":{"VolumeSize":50,"Encrypted": true}}


Comments

  1. Remember, the feeling you get from a good is far better than the feeling you get from sitting around wishing you were running. See the link below for more info.


    #running
    www.ufgop.org


    ReplyDelete

Post a Comment

Popular posts from this blog

Openvpn and unbound combined break dig command

Stress Linux system: stress-ng

Google Nexus 4: permanent back panel glass repair for less than a penny