https://qiita.com/params_bird/items/dc2a3868f4a2caf0504c
Basically, I referred to the article at the above URL.
In the latter half of the above article, I could not enter the command in the terminal even if I did it according to the article, so I will describe the procedure I took only there.
$ heroku config --app The name of the app you are deploying
https://reasonable-code.com/heroku-config/ (The above command is from this article)
$ heroku config:set S3_ACCESS_KEY="Enter the access key you wrote down earlier here" --app The name of the app you are deploying
$ heroku config:set S3_SECRET_KEY="Similarly, enter the secret key" --app The name of the app you are deploying
$ heroku config:set S3_BUCKET="Enter the name of the bucket" --app The name of the app you are deploying
$ heroku config:set S3_REGION="Enter the name of the region" --app The name of the app you are deploying
The part that is different from the URL introduced at the beginning is [--app name of the deployed app]. By adding this, I was able to execute the command safely, and I was able to save the image from the application deployed on Heroku.
Recommended Posts