Home>
problem

I get an Application error on heroku production.

error contents

If i check with $heroku run rails console, there is one part that i am interested in. It is less than.

..
..
..
1: from /app/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/configuration.rb:72: in `call'
/app/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/regional_endpoint.rb:42:in `block in<class: RegionalEndpoint>': Invalid `: region` option was provided. (Aws :: Errors :: InvalidRegionError)
* Not every service is available in every region.
* Never suffix region names with availability zones.
  Use "us-east-1", not "us-east-1a"
Known AWS regions include (not specific to this service):
af-south-1
ap-east-1
ap-northeast-1
ap-northeast-2
ap-south-1
ap-southeast-1
ap-southeast-2
ca-central-1
eu-central-1
eu-north-1
eu-south-1
eu-west-1
eu-west-2
eu-west-3
me-south-1
sa-east-1
us-east-1
us-east-2
us-west-1
us-west-2
cn-north-1
cn-northwest-1
us-gov-east-1
us-gov-west-1
us-iso-east-1
us-isob-east-1
What I tried

Actually, I set it using Heroku's ENV variable as follows.

$heroku config: set AWS_ACCESS_KEY = 
$heroku config: set AWS_SECRET_KEY =<secret key>
$heroku config: set AWS_REGION =<region name>
$heroku config: set AWS_BUCKET =<bucket name>

However, you may have made an inappropriate statement when setting the region. I entered the following.

ubuntu: ~/environment/sample_app (user-microposts) $heroku config: set AWS_REGION = region = us-east-2


From the feeling that I saw the error, I thought that I should have described only the region name as shown below without writing'region ='.
What do you think.

$heroku config: set AWS_REGION = us-east-2


If anyone knows, please help.

  • Answer # 1

    Was self resolved. After all, the description of the region was wrong.
    How to set the env variable of the region is as I thought
    $heroku config: set AWS_REGION = us-east-2
    Seems to be appropriate.
    $heroku config: set AWS_REGION = region = us-east-2
    Was inappropriate.
    It seems that there are many mistakes. I hope it will be helpful to anyone in the future.

  • Answer # 2

    Was self resolved. After all, the description of the region was wrong.
    How to set the env variable of the region is as I thought

    $heroku config: set AWS_REGION = us-east-2
    Seems to be appropriate.
    $heroku config: set AWS_REGION = region = us-east-2
    Was inappropriate.
    It seems that there are many mistakes. I hope it will be helpful to anyone in the future.

Related articles