A. J. Shukla
A. J. Shukla

Reputation: 31

EBS Volume attach to running EC2 Windows instance

I am having a scenario where EC2 mount two EBS Volumes and one of them is root. My ELB is setup to size=1 instance actively running. I want to have second EBS volume snapshot to be attached to new EC2 spin-off using AMI. How to do it using CloudWatch Event and Lambda?

EC2 API for volume mount do not specify windows mounts. Any Idea how to support EC2 Windows mounts using Lambda Function or any other scripting technique?

EDITED - Here is what is expected - I have secondary EBS volume mounted to EC2 Windows. I have taken AMI of this machine and associated with Auto Scaling Group and Launch Configuration. In case of DR, ASG spins off new EC2 instance using defined AMI. It is desired that this new spin off machine to use same secondary EBS volume from snapshot.

Upvotes: 2

Views: 1090

Answers (2)

John Rotenstein
John Rotenstein

Reputation: 269826

An Amazon Machine Image (AMI) can contain multiple volumes.

I suggest you:

  • Launch an Amazon EC2 instance with both desired volumes (Root + Volume X:)
  • Create a new AMI from that instance, specifying both volumes
  • Create a new Auto Scaling launch configuration using that new AMI
  • Edit the Auto Scaling group to use the new Launch Configuration

Upvotes: 0

John Rotenstein
John Rotenstein

Reputation: 269826

Just mount the volume as normal. It is supported for both Linux and Windows.

If you are worried about the Linux-like device name, see Device Naming on Windows Instances - Amazon Elastic Compute Cloud:

Recommended for EBS Volumes: xvd[f-z]

Upvotes: 1

Related Questions