What is the porcess to add swap to an EC2 Instance?

0 votes
I'm running an ec2 micro instance and i've been finding that the instance occasionally runs out of memory. Other than using a larger instance size, what else can be done?
Mar 27 in AWS by Tushar
36 views

1 answer to this question.

0 votes

If you are finding problem with your storage then you can simply do the following steps to add upto 1GB to your instance:

sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
sudo mkswap /swapfile
sudo swapon /swapfile

To enable it by default after reboot, add this line to /etc/fstab:

/swapfile swap swap defaults 0 0
answered Mar 27 by Himanshu

Related Questions In AWS

0 votes
1 answer

How to add swap to Amazon EC2 instance?

A fix for this problem is to ...READ MORE

answered Sep 11, 2018 in AWS by Archana
• 4,110 points
47 views
0 votes
1 answer

What is the salary offered to an AWS pre-sales Architect?

The salary offered to fresher can range ...READ MORE

answered Nov 30, 2018 in AWS by Aniket
135 views
0 votes
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Cannot ping to my EC2 Instance

This problem mainly occurs because of the ...READ MORE

answered Mar 27 in AWS by Ritu
65 views