How can i upgrade ec2 instance everyday for sometime only?

0

Hello

I am trying to migrate my some of websites on aws by creating one instance on EC2 with 4 cpu and 8 GB RAM but when some backup process of website comes into picture at that time might be i need more cpu power like 8 cpu for temporary period every day so to reduce the cost how can i implement this scenario on aws ? Can it be done by aws automatically when load increase ?

질문됨 2년 전368회 조회
1개 답변
0

Resizing an EC2 instance requires stopping the instance, changing the instance size (more/less CPU/memory) and then start it again (steps here). For a single instance, this would cause a temporary outage of that instance.

To automate, AWS Systems Manager can run automations, including executing API calls. There's an automation document for resizing an instance you could leverage. In order for this to kick off in response to an event, you could create a CloudWatch to trigger SSM based on instance load (assuming you're logging the proper metrics to CloudWatch, by default CPU is tracked but not memory unless you enable it).

Instead of based on load, you could leverage CloudWatch to trigger events based on time, so if the backups occur on a set schedule, you could upsize beforehand and downsize after.

Regarding backing up, you could instead create and manage backups without causing any interruption by using AWS Backup to take snapshots of the instance's EBS volumes. Should you ever need the data back, you can create a volume from the snapshot to copy the data off or, if the whole instance needs to be reverted, replace the EBS volume from a prior snapshot.

profile pictureAWS
답변함 2년 전
  • can we use burstable performance to scale up and scale down ec2 insatnce withour stopping current running instance?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠