I am trying to create s3 bucket on localstack ready hook using a bash file. But on trying to run the localstack container getting error as follow:
[ MainThread] localstack.runtime.init : Error while running script Script(path='/etc/localstack/init/ready.d/buckets.sh', stage=READY, state=ERROR): [Errno 13] Permission denied: '/etc/localstack/init/ready.d/buckets.sh'
The docker-compose volume section for localstack is as follow:
volumes:
- ./internal/localstack-seed:/etc/localstack/init/ready.d
please make sure the file is executable by running chmod +x buckets.sh, or you can cover the whole folder with find /path/to/folder -type f -exec chmod +x {} \;. this is mentioned in the init hooks documentation, but towards the end, which might make it less visible.
if you're using localstack init hooks with frameworks like testcontainers, you can explicitly set the mode of the file, or you need to watch out that the new permissions are being picked up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With