6

The only way I know how to switch regions using the EB CLI is eb init. This feels like a hack because in addition to selection my region, I have to re-answer a bunch of questions I've already answered.

Is there a way to just switch regions on the EB CLI without going through all the eb init steps?

2 Answers 2

8

Yes. When you run eb init it should only ask you for the things it doesn't know. Running it a second time should do nothing. Therefore I am presuming you are running eb init -i which forces all the questions. You can simply use eb init --region us-east-1 to switch. It shouldn't ask you any questions.

1
  • Thanks. This is exactly what I was looking for. Just a small correction: it needs to be us-east-1 as opposed to us-east1. Aug 28, 2015 at 14:18
4

When you run eb init, the EB CLI will generate .elasticbeanstalk/config.yml file inside working directory. The file format is something like:

branch-defaults:
  default:
    environment: Sample-Env
global:
  application_name: Example App
  default_ec2_keyname: SecretSSH-Key
  default_platform: 64bit Amazon Linux 2015.03 v2.0.0 running Docker 1.6.2
  default_region: us-east-1
  profile: null
  sc: null

You can modify default_region to another valid region.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .