Instance Store AMI Launch Feature: Auto-create EBS from Snapshot and Attach at Launch
Ideally this feature would be available when setting up launch configurations, snapshot requests and plain old dedicated server launches.
This would require Ylastic user to enter following variables:
- the snapshot ID
- device mapping
- volume size
- mount point
- volume format
while instance run state is:
Pending:
- ec2-create-volume --size X --snapshot snap-XXXXXX --availability-zone INSTANCES-ZONE
Running:
- ec2-attach-volume vol-NEW-VOLUME-ID -d /dev/DEVICE-MAPPING
- mount /dev/DEVICE-MAPPING /MOUNT-POINT
- echo "/dev/DEVICE-MAPPING /MOUNT-POINT VOLUME-FORMAT noatime 0 0" > /etc/fstab
A particular use case I have is that I want to store my cert and key on an EBS snapshot. This creates a catch-22- can't make any ec2 calls until that volume is created from snapshot and attached. I believe that this feature would work for this use case if I have my user-data script 'wait X' before running or check for availability of the device before running. Perhaps you guys can put a tooltip in the launch config window with the proper syntax for users with that requirement to append to the start of their user data script?
Most of the ideas for this feature come from Shlomo Swidler's article "Mount an EBS Volume Created from Snapshot at Startup" http://www.shlomoswidler.com/2009/08/mount-ebs-volume-created-from-...
Shlomo's article on storing EC2 credentials on a snapshot is here, if anyone is interested: http://www.shlomoswidler.com/2010/07/storing-aws-credentials-on-an-...
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ylastic on 07 Aug, 2010 08:36 PM
This is very interesting. Will take a look at Shlomo's article and post back comments.
thanks!
2 Posted by jack.murgia on 07 Apr, 2011 09:42 PM
In case anyone is still interested in this subject- IAM makes it safe to put a limited set of credentials in an AMI for accomplishing this task. We have a modified version of Shlomo Swidler's script and added another script which figures out the most recent snapshot to build an EBS volume from.
These scripts are included in all our public AMI's- try them out and visit to our wiki if you would like to review and comment on our current thoughts regarding best practices.
Free AMIs: http://thecloudmarket.com/owner/344121746316--cloud-controllers
Wiki: https://wiki.cloudcontrollers.com/AWS_Best_Practices
3 Posted by buy zithromax on 16 Feb, 2013 06:30 PM
http://antiviralmeds.info#44286 - buy zithromax shslq zithromax dlwqo http://antiviralmeds.info#26320 - zithromax snghs
Ylastic closed this discussion on 08 Aug, 2014 12:03 PM.