You can use the AWS API to create a snapshot but the without downtime
part is going to be tricky if your care about file system integrity
.
Note: In many cases, you might not be super concerned with file system integrity
, but it's hard to decide that for you without a lot more information about your system.
From this: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSnapshot.html ...
...See this:
If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending.
...And this:
To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.
You can also issue a 'Create Image' which creates an AMI (and creates a snapshot of the volume too). http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html This has the option of NoReboot
:
By default, this parameter is set to false, which means Amazon EC2 attempts to shut down the instance cleanly before image creation and then reboots the instance. When the parameter is set to true, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.