Skip to content
Discussion options

You must be logged in to vote

Hi Victor ,
The issue comes from the fact that your queue worker is running under a different user (root), so the AWS SDK looks for ~/.aws/credentials in /root/.aws/credentials instead of /var/www/.aws/credentials.
You can solve this in two clean ways:
Run your supervisor worker under the same user as your web server (e.g. www-data), so it picks up the same ~/.aws/credentials.
Or explicitly tell the AWS SDK where to find the credentials by setting:

environment=AWS_SHARED_CREDENTIALS_FI
LE="/var/www/.aws/credentials"

in your supervisor config.
This way you don’t need to put credentials in .env, and both Mail::send and Mail::queue will work consistently.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by victor-david
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Nabil-nl
Comment options

@victor-david
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants