awslabs / aws-rails-provisioner

Define and deploy containerized Ruby on Rails Applications on AWS
Apache License 2.0
200 stars 19 forks source link

Region not provided #19

Closed chrisgeek closed 3 years ago

chrisgeek commented 3 years ago

When trying to build, I get this error No region was provided. Configure the `:region` option or export the region name to ENV['AWS_REGION'] (Aws::Errors::MissingRegionError) I couldn't find it on the doc or anywhere online.

aws-rails-provisioner.yml

version: '0'

vpc:
  max_az: 2
  enable_dns: true
services:
  hospital-sys:
    source_path: ./hospital-sys
    fargate:
      desired_count: 3
      memory: 512
      cpu: 256
      envs:
        PORT: 80
        RAILS_LOG_TO_STDOUT: true
      public: true
    db_cluster:
      engine: aurora-postgresql
      db_name: app_development
    scaling:
      max_capacity: 5
      on_cpu:
        target_util_percent: 80
        scale_in_cool_down: 300
      on_requests:
        requests_per_target: 1000
mullermp commented 3 years ago

Hey @chrisgeek , that error is specifically from the SDK and not from Rails provisioner. Set your AWS region ENV variable like so export AWS_REGION=us-west-2 or configure it in the shared config and credentials file ~/.aws/config https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

chrisgeek commented 3 years ago

Alright @Mullermp