I have AWS Elastic Beanstalk with mounted S3 bucket via S3FS. I intended to let EB autoscale the instances. So I made an AMI image of the configured instance (with reboot) and then used that image in autoscaling configuration.
My /etc/fstab configuration looks like
s3fs#mybucket:/images /var/app/current/images fuse allow_other,use_cache=/tmp/cache 0 0
But when the instance is launched manualy or via autoscaling, the S3FS is mounted unreliably - I tried 5 manual reboots and only one worked, the other four ones hadn't S3 bucket mounted correctly. The mounted directory rights looked like d?????????, onwer ?, group?. Ls and fusermount -u throwed error: Transport endpoint is not connected
What could be the problem?
I already found where the problem is. Solved by adding uid and gid = 500 (ec2-user for root in my case of Amazon Linux AMI).
Now it is working reliably