WP core and plugin updates fail AWS

Check your file permissions, you can run the following command in the root folder.

chown www-data:www-data  -R *
find . -type f -exec chmod 644 {} \; 
find . -type d -exec chmod 755 {} \; 

To troubleshoot WordPress errors, you require to enable WordPress Debug, which can be done using wp-config.php.
You need to copy and paste the code in the wp-config.php file shown below.
define( 'WP_DEBUG', true ); .