I am trying to upload my laravel project to AWS using elastic beanstalk. However, every time I upload the project (using the UI button "upload and deploy") I get the following error during deployment:
[Instance: i-064b98ad84a27d750] Command failed on instance. Return code: 1 Output: chmod: cannot access ‘/var/app/current/storage’: No such file or directory. Hook /opt/elasticbeanstalk/hooks/appdeploy/post/99_make_storage_writable.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
My .ebextensions file (named: "04postdeploy.config") looks like this:
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/99_make_storage_writable.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
chmod -R 777 /var/app/current/storage
Can someone please point me out what I am doing wrong?
Thanks in advance!