I’m using Waffle and Ex_Aws in an attempt to store images in an S3 bucket. This has been going well but I’m running into an error that I can’t figure out.
** (RuntimeError) Elixir.ExAws.Operation.ExAws.Operation.S3.perform/2 cannot perform operation on `nil` bucket
When I try to add a “logo” to my AWS bucket I’m getting this error. I’m not exactly sure what I’m doing wrong as I followed the documentation to the best of my ability.
Here is my config.exs
config :waffle,
storage: Waffle.Storage.S3,
bucket: System.get_env("AWS_S3_BUCKET")
# If using S3:
config :ex_aws,
json_codec: Jason,
access_key_id: System.get_env("AWS_ACCESS_KEY_ID"),
secret_access_key: System.get_env("AWS_SECRET_ACCESS_KEY"),
region: System.get_env("AWS_REGION"),
The dependencies are added correctly and the env vars are properly set up on my staging environment.
I would be happy to show the uploaders but I’m not sure it’s necessary, it seems my problem is configuration related. I’m probably doing something very obvious incorrectly but I suppose I need some help figuring that out. Any ideas?
Thank you!!