LoginSignup
0
0

More than 3 years have passed since last update.

ENV['AWS_REGION'] (Aws::Errors::MissingRegionError) への対策

Posted at

問題の背景

missing region; use :region option or export region name to ENV['AWS_REGION'] (Aws::Errors::MissingRegionError)

上記のようなエラーを踏んだ方への報告です。

よくある回答

Region設定が間違っているのでRegionを正しく指定しましょう。

参考:
- https://stackoverflow.com/questions/32224995/rails4-1-aws-errors-missing-region
- https://qiita.com/1915keke/items/1302ef830a267be3a828

今回のケース

環境変数 ENV['AWS_REGION'] が読み込めていない為にエラーが出る。

対策

僕は zsh を使っているので、そこに一文追加

$ vim ~/.zshrc
~/.zshrc
eval "$(direnv hook zsh)"
$ source ~/.zshrc

上記の工程で無事環境変数を読み込んでくれました。

まとめ

Regionエラーは、Regionのせいだけでなく、環境変数の読み込みが出来てない場合もあるので注意!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0