Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit 0218be8

Browse files
authored
Merge pull request #131 from henriqueribeiro/add_swap_space
Add swap space in EC2 instances
2 parents 784d4c5 + 9b68f9c commit 0218be8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ecs-additions/ecs-additions-common.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ chmod a+x /opt/ecs-additions/awscli-shim.sh
1010
mkdir /opt/aws-cli/bin
1111
cp /opt/ecs-additions/awscli-shim.sh /opt/aws-cli/bin/aws
1212

13+
# add 4GB of swap space
14+
dd if=/dev/zero of=/swapfile bs=128M count=32
15+
chmod 600 /swapfile
16+
mkswap /swapfile
17+
swapon /swapfile
18+
swapon -s
19+
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab

0 commit comments

Comments
 (0)