<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">bug report</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ec2_lc module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">1.9.2</p>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">basic configuration</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">ec2_lc fail to create when no default vpc in region</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">:</p>
<ol dir="auto">
<li>delete default vpc in some region</li>
<li>create non-default vpc by hand or ec2_vpc module</li>
<li>try run</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- ec2_lc:
    name: launch config
    state: present
    image_id: any
    region: &quot;{{ region }}&quot;
    key_name: any
    security_groups: ['any group doesnt matter' ]
    instance_type: t1.micro"><pre class="notranslate"><code class="notranslate">- ec2_lc:
    name: launch config
    state: present
    image_id: any
    region: "{{ region }}"
    key_name: any
    security_groups: ['any group doesnt matter' ]
    instance_type: t1.micro
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Launch configuration  should be created .<br>
like:<br>
awscli create launch config without  any errors.<br>
aws web console show same error but anyway create config.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">error happen</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="failed: [127.0.0.1] =&gt; {&quot;failed&quot;: true}
msg: BotoServerError: 400 Bad Request
&lt;ErrorResponse xmlns=&quot;http://autoscaling.amazonaws.com/doc/2011-01-01/&quot;&gt;
  &lt;Error&gt;
    &lt;Type&gt;Sender&lt;/Type&gt;
    &lt;Code&gt;ValidationError&lt;/Code&gt;
    &lt;Message&gt;No default VPC for this user&lt;/Message&gt;
  &lt;/Error&gt;
  &lt;RequestId&gt;a95979d7-28d0-11e5-a457-7b851bc22db7&lt;/RequestId&gt;
&lt;/ErrorResponse&gt;"><pre class="notranslate"><code class="notranslate">failed: [127.0.0.1] =&gt; {"failed": true}
msg: BotoServerError: 400 Bad Request
&lt;ErrorResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/"&gt;
  &lt;Error&gt;
    &lt;Type&gt;Sender&lt;/Type&gt;
    &lt;Code&gt;ValidationError&lt;/Code&gt;
    &lt;Message&gt;No default VPC for this user&lt;/Message&gt;
  &lt;/Error&gt;
  &lt;RequestId&gt;a95979d7-28d0-11e5-a457-7b851bc22db7&lt;/RequestId&gt;
&lt;/ErrorResponse&gt;
</code></pre></div>
<p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="94596428" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/1719" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/1719/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/1719">ansible/ansible-modules-core#1719</a></p>
<h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report
<ul dir="auto">
<li>feature request</li>
</ul>
</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.9.3<br>
Also tried with the early 2.0.0 version.</p>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">Nothing special, just the inventory, sudo_user, remote_user and added additional roles_path.</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Ubuntu 14.04 for manager and managed</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">I’m trying to auto-configure elb and asg, but when using the ec2_lc module for the preparation I get the error that I don’t have a default VPC</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Try to run the prepare launch task using ec2_lc module without a default VPC</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">It should work even when no default VPC is used, or an option to declare the VPC would be helpful.</p>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="failed: [localhost] =&gt; {&quot;failed&quot;: true}
msg: BotoServerError: 400 Bad Request
&lt;ErrorResponse xmlns=&quot;http://autoscaling.amazonaws.com/doc/2011-01-01/&quot;&gt;
  &lt;Error&gt;
    &lt;Type&gt;Sender&lt;/Type&gt;
    &lt;Code&gt;ValidationError&lt;/Code&gt;

▽
  1 ---
    &lt;Message&gt;No default VPC for this user&lt;/Message&gt;
  &lt;/Error&gt;
  &lt;RequestId&gt;b4f24941-9384-32-9bc2-ef8e4ec57f44&lt;/RequestId&gt;
&lt;/ErrorResponse&gt;
FATAL: all hosts have already failed -- aborting"><pre class="notranslate"><code class="notranslate">failed: [localhost] =&gt; {"failed": true}
msg: BotoServerError: 400 Bad Request
&lt;ErrorResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/"&gt;
  &lt;Error&gt;
    &lt;Type&gt;Sender&lt;/Type&gt;
    &lt;Code&gt;ValidationError&lt;/Code&gt;

▽
  1 ---
    &lt;Message&gt;No default VPC for this user&lt;/Message&gt;
  &lt;/Error&gt;
  &lt;RequestId&gt;b4f24941-9384-32-9bc2-ef8e4ec57f44&lt;/RequestId&gt;
&lt;/ErrorResponse&gt;
FATAL: all hosts have already failed -- aborting
</code></pre></div>