If your WordPress website is hosted on Amazon EC2 cloud hosting, you probably have this problem. If you see that WordPress requires FTP Credentials to Install or Update Plugins/Themes on Amazon EC2 cloud hosting, your file permissions are not correct. The issue is that apache does not have access to the folders due to ownership. The default permission and ownership of files and folders belongs to the ‘ec2-user’.
To fix this, run this in your terminal and that should resolve this:
$ sudo chown -R apache:apache /var/www/html
Hope that helps!