Pass through AWS_SECRET_ACCESS_KEY #37

Merged
nicksellen merged 1 commits from fix/missing-aws-key-env into main 2026-01-08 22:46:11 +00:00
Owner

Previously I forgot to add the bits to pass AWS_SECRET_ACCESS_KEY secret through - as mastodon can't natively read AWS_SECRET_ACCESS_KEY_FILE it needs to be included using the file_env technique.

This is similar to how it is in the hometown recipe, and if you don't have AWS_SECRET_ACCESS_KEY or AWS_SECRET_ACCESS_KEY_FILE it won't cause an error (tried it locally).

I've chaos deployed it to bath.social and it fixed my issue. The symptom was that it seemed to be working, but I looked up an external users profile and it gave a 500 error with this message in the log:

�2026-01-07T22:56:48.057315000Z Information for cause: Aws::Sigv4::Errors::MissingCredentialsError (missing credentials, provide credentials with one of the following options:
I2026-01-07T22:56:48.057459000Z   - :access_key_id and :secret_access_key
02026-01-07T22:56:48.057595000Z   - :credentials
;2026-01-07T22:56:48.057700000Z   - :credentials_provider):
I2026-01-07T22:56:48.057769000Z [5cb6496c-e843-4eee-8775-adafb83a7092]
�2026-01-07T22:56:48.057836000Z [5cb6496c-e843-4eee-8775-adafb83a7092] lib/paperclip/attachment_extensions.rb:92:in 'block in Paperclip::AttachmentExtensions#save'
2026-01-07T22:56:48.057897000Z [5cb6496c-e843-4eee-8775-adafb83a7092] lib/paperclip/attachment_extensions.rb:92:in 'Paperclip::AttachmentExtensions#save'
2026-01-07T22:56:48.058020000Z [5cb6496c-e843-4eee-8775-adafb83a7092] app/models/account.rb:345:in 'Account#save_with_optional_media!'
[Previously](https://git.coopcloud.tech/coop-cloud/mastodon/pulls/32) I forgot to add the bits to pass `AWS_SECRET_ACCESS_KEY` secret through - as mastodon can't natively read `AWS_SECRET_ACCESS_KEY_FILE` it needs to be included using the `file_env` technique. This is similar to how it is in the hometown recipe, and if you don't have `AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_ACCESS_KEY_FILE` it won't cause an error (tried it locally). I've chaos deployed it to bath.social and it fixed my issue. The symptom was that it seemed to be working, but I looked up an external users profile and it gave a 500 error with this message in the log: ``` �2026-01-07T22:56:48.057315000Z Information for cause: Aws::Sigv4::Errors::MissingCredentialsError (missing credentials, provide credentials with one of the following options: I2026-01-07T22:56:48.057459000Z - :access_key_id and :secret_access_key 02026-01-07T22:56:48.057595000Z - :credentials ;2026-01-07T22:56:48.057700000Z - :credentials_provider): I2026-01-07T22:56:48.057769000Z [5cb6496c-e843-4eee-8775-adafb83a7092] �2026-01-07T22:56:48.057836000Z [5cb6496c-e843-4eee-8775-adafb83a7092] lib/paperclip/attachment_extensions.rb:92:in 'block in Paperclip::AttachmentExtensions#save' 2026-01-07T22:56:48.057897000Z [5cb6496c-e843-4eee-8775-adafb83a7092] lib/paperclip/attachment_extensions.rb:92:in 'Paperclip::AttachmentExtensions#save' 2026-01-07T22:56:48.058020000Z [5cb6496c-e843-4eee-8775-adafb83a7092] app/models/account.rb:345:in 'Account#save_with_optional_media!' ```
nicksellen added 1 commit 2026-01-07 23:13:15 +00:00
Pass through AWS_SECRET_ACCESS_KEY
Some checks failed
continuous-integration/drone/pr Build is failing
5b2d3845db
nicksellen requested review from 3wordchant 2026-01-07 23:13:40 +00:00
nicksellen requested review from ammaratef45 2026-01-07 23:13:41 +00:00
Author
Owner

Added a couple of potential reviewers, hope thats ok!

Added a couple of potential reviewers, hope thats ok!
ammaratef45 approved these changes 2026-01-08 20:23:13 +00:00
ammaratef45 left a comment
Owner

lgtm!

lgtm!
Owner

I also noticed the recipe has maintainers, I was about to nag the community on Matrix lol

Still happy to be added as a reviewer anytime <3

I also noticed the recipe has maintainers, I was about to nag the community on Matrix lol Still happy to be added as a reviewer anytime <3
Author
Owner

Ah yeah, I hadn't noticed the official maintainer bit. Maybe we should also both add ourselves to that list? I'll do it if you do... (is there some process there?).

Ah yeah, I hadn't noticed the official maintainer bit. Maybe we should also both add ourselves to that list? I'll do it if you do... (is there some process there?).
nicksellen merged commit f0cce1ffad into main 2026-01-08 22:46:11 +00:00
Sign in to join this conversation.
No description provided.