FedRAMP STIG hardening guidelines require that nopasswd should not appear in any sudoers configuration. Unfortunately, this also applies to the root user. Can instances of sudo -u ec2-user be replace with runuser -l ec2-user -g ec2user as runuser is available on AL2023, does not involve sudo, and is only available to the root user?