# Starting EC2 Instance in 'us-west-2a' Region Gives Unexpected Error

**URL:** <https://forum.ansible.com/t/starting-ec2-instance-in-us-west-2a-region-gives-unexpected-error/16081>\
**Category:** Ansible Project\
**Created:** [August 30, 2014, 3:08am UTC](https://forum.ansible.com/t/starting-ec2-instance-in-us-west-2a-region-gives-unexpected-error/16081 "2014-08-30T03:08:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Lloyd](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@David\_Lloyd](https://forum.ansible.com/u/David_Lloyd)\
**Post date:** [August 30, 2014, 3:08am UTC](https://forum.ansible.com/t/starting-ec2-instance-in-us-west-2a-region-gives-unexpected-error/16081/1 "2014-08-30T03:08:02Z")

</div>

I have:

- hosts: localhost

gather\_facts: false

connection: local

vars:

instance\_ids:

- ‘i-62f8a46f’

region: ‘us-west-2a’

tasks:

- name: Start the instance(s).

local\_action:

module: ec2

instance\_ids: ‘{{ instance\_ids }}’

region: ‘{{ region }}’

state: running

wait: True

This is fairly much a copy past of one of the examples.

However, Ansible’s ec2 module complains like this:

% ansible-playbook ./playbook.pp

PLAY [localhost] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK: [Start the instance(s).] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

failed: [localhost] =\> {“failed”: true}

msg: value of region must be one of: ap-northeast-1,ap-southeast-1,ap-southeast-2,eu-west-1,sa-east-1,us-east-1,us-west-1,us-west-2, got: us-west-2a

FATAL: all hosts have already failed – aborting

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

to retry, use: --limit @/Users/lloy0076/playbook.pp.retry

localhost : ok=0 changed=0 unreachable=0 failed=1

Unfortunately this region **does** now exist; I added an ‘ec2\_url’ rather than the ‘region’ but how would I go about finding out if someone’s asked for the module to be updated to reflect this new region?

DSL

---

<div class="post-metadata">

**Author:** ![Can\_Shen](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@Can\_Shen](https://forum.ansible.com/u/Can_Shen)\
**Post date:** [August 30, 2014, 4:21pm UTC](https://forum.ansible.com/t/starting-ec2-instance-in-us-west-2a-region-gives-unexpected-error/16081/2 "2014-08-30T16:21:26Z")

</div>

region: ‘us-west-2a’

aws region not has this region ， us-west-2a is zone name not region ， the region name is us-west-2

在 2014年8月30日星期六UTC+8上午11时08分02秒，David Lloyd写道：

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [August 31, 2014, 3:49am UTC](https://forum.ansible.com/t/starting-ec2-instance-in-us-west-2a-region-gives-unexpected-error/16081/3 "2014-08-31T03:49:07Z")

</div>

The ec2 modules only accept the top level region, not the sub-regions. Just specify us-west-2 instead.
