# ec2 mudoles can't create ec2 instances

**URL:** <https://forum.ansible.com/t/ec2-mudoles-cant-create-ec2-instances/20248>\
**Category:** Ansible Project\
**Tags:** ubuntu, aws\
**Created:** [January 18, 2016, 8:58am UTC](https://forum.ansible.com/t/ec2-mudoles-cant-create-ec2-instances/20248 "2016-01-18T08:58:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lwq\_Adolph](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@lwq\_Adolph](https://forum.ansible.com/u/lwq_Adolph)\
**Post date:** [January 18, 2016, 8:58am UTC](https://forum.ansible.com/t/ec2-mudoles-cant-create-ec2-instances/20248/1 "2016-01-18T08:58:08Z")

</div>

Hi, everyone:  
My base environment are below:

- ubuntu 14.04 64bit
- ansible 1.9.4
- python 2.7.9 64bit  
​

I am green hand to ansible.I study ansible documentation for ec2 module [http://docs.ansible.com/ansible/ec2\_module.html](http://docs.ansible.com/ansible/ec2_module.html) . I want to create at least 100 ec2 instances on AWS. So I wrate a test yml file just for a test,the content is bellow:

```auto
---
  - name: deploy basic env
    hosts: 127.0.0.1
    connection: local
    gather_facts: False

    tasks:
      - name: Provision a set of instances
        ec2:
          aws_access_key: "xxx"
          aws_secret_key: "xxx"
          instance_type: t2.micro
          image: ami-52d1183f
          group: test
          count_tag:
            Name: testenv
          count: 3
          wait: yes
          vpc_subnet_id: subnet-2649d843
          assign_public_ip: yes
          region: cn-north-1
        register: ec2_test

      - name: Add all instance public IPs to host group
        add_host: hostname={{ item.public_ip }} groups=ec2hosts
        with_items: ec2_test.instances

```

​

I add

```auto
[localhost]
127.0.0.1

```

​

to  
/etc/ansible/hosts

​

When I run

```auto
adolph@geek:dcos_absible_prac$ ansible-playbook prac.yml 

PLAY [deploy basic env] ******************************************************* 

TASK: [Provision a set of instances] ****************************************** 
failed: [127.0.0.1] => {"failed": true}
msg: Region cn-north-1 does not seem to be available for aws module boto.ec2. If the region definitely exists, you may need to upgrade boto

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/adolph/prac.retry

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

```

​

I am in China and  
cn-noarth-1  
is supported by boto. So I don’t know what is the problem.Can you help me ?

​ isis supported by boto

---

<div class="post-metadata">

**Author:** ![Rob\_White](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@Rob\_White](https://forum.ansible.com/u/Rob_White)\
**Post date:** [January 20, 2016, 11:27pm UTC](https://forum.ansible.com/t/ec2-mudoles-cant-create-ec2-instances/20248/2 "2016-01-20T23:27:07Z")

</div>

Ansible gets its regions using the boto module regions call. E.g. for ec2 = [http://boto.cloudhackers.com/en/latest/ref/ec2.html#boto.ec2.regions](http://boto.cloudhackers.com/en/latest/ref/ec2.html#boto.ec2.regions)

Double check your boto version.
