开发者

Increasing compute power temporarily on AWS

开发者 https://www.devze.com 2023-02-05 09:31 出处:网络
I have an Amazon EC2 Micro instance running using EBS storage.This more than meets my needs 99.9% of the time, however I need to perform a very intensive database operation as a once off which kills t

I have an Amazon EC2 Micro instance running using EBS storage. This more than meets my needs 99.9% of the time, however I need to perform a very intensive database operation as a once off which kills the Micro instance.

I开发者_如何转开发s there a simple way to restart the exact same instance but with lots more power for a temporary period, and then revert back to the Micro instance when I'm done? I thought this seemed more than possible under the cloud based model Amazon uses but it doesn't appear to simply be a matter of shutting down and restarting with more power as I first thought it might be.


If you are manually running the database operation, then you can just create the image of the server, launch a small or a high cpu instance using the same image, run the database operation and then create the image and launch it again as a micro instance. You can also automate this process by writing scripts using AWS APIs.


In case you're using an EBS-backed AMI you don't have to create a new image and launch it. Just stop the machine and issue a simple EC2 API command to change the instance type:

ec2-modify-instance-attribute --instance-type <instance_type> <instance_id>

Keep in mind that not all instance types work for every AMI. The applicable instance types depend on the machine itself and the kernel. You can find a list of available instance types here: http://aws.amazon.com/ec2/instance-types/

0

精彩评论

暂无评论...
验证码 换一张
取 消