Skip to content

Why can't we automate setting this ulimit permanently in packer?

0

For some reason, trying to automate setting these values in packer works on every single AMI I have except for Amazon Linux 2023, why would that be? Does it have other constraints that are not described here? This is what we run in packer on the AMI.

sudo sed -i '/# End of file/i * soft nofile unlimited' /etc/security/limits.conf
sudo sed -i '/# End of file/i * hard nofile unlimited' /etc/security/limits.conf
sudo sed -i '/# End of file/i * soft nproc unlimited' /etc/security/limits.conf
sudo sed -i '/# End of file/i * hard nproc unlimited' /etc/security/limits.conf

asked 2 years ago113 views