Installation of psql client for PostgreSQL restricted

Hey guys, I just started the Assignment 1: Troubleshooting Database Connectivity on AWS, which is part of the data engineering specialization (course 2/week 1). I need to install the psql client for the PostgreSQL database. This is the command provided in the notebook:

sudo amazon-linux-extras install postgresql10 -y

However, I encounter the following error:

sudo: The “no new privileges” flag is set, which prevents sudo from running as root.
sudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.

I already restarted the server a couple of times but the issue is still persistent