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, 2019 in AWS by Tushar
497 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, 2019 by Himanshu

Related Questions In AWS

0 votes
0 answers
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,170 points
599 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
1,143 views
0 votes
2 answers
0 votes
1 answer

Using Shapely on AWS Lambda with Python 3

For some reason, the pip install of ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 58,100 points
2,891 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

What happens to data once we terminate the EC2 Instance?

The data stored in local instance store ...READ MORE

answered Jan 31, 2019 in AWS by jagarnath
1,797 views
0 votes
1 answer

Cannot ping to my EC2 Instance

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

answered Mar 27, 2019 in AWS by Ritu
649 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP