The modules directory is already created. However, I see that you changed the permissions of the drupal folder (you used 777 that is a bit dangerous) and that may be causing the problem. Can you use the following permissions configuration?
sudo chown -R bitnami:daemon /opt/bitnami/apps/drupal/htdocs
sudo chmod -R o-w /opt/bitnami/apps/drupal/htdocs
Let us know if that helps.