need help to revert back to default file permission magento2 aws

After giving 777 permission website not working I think issue with file permission ,can you have a look ,let me know what to do next to bring back to default permission Installed on aws ,rds,

file permission