# ec2\_instance & AMIs that require agreement to terms & conditions?

**URL:** <https://forum.ansible.com/t/ec2-instance-amis-that-require-agreement-to-terms-conditions/31489>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [October 18, 2019, 9:30am UTC](https://forum.ansible.com/t/ec2-instance-amis-that-require-agreement-to-terms-conditions/31489 "2019-10-18T09:30:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [October 18, 2019, 9:30am UTC](https://forum.ansible.com/t/ec2-instance-amis-that-require-agreement-to-terms-conditions/31489/1 "2019-10-18T09:30:36Z")

</div>

Hi

While trying to spin up a CentOS7 instance using ec2\_instance, I get  
the following error message (ansible 2.8.5):

fatal: [localhost]: FAILED! =\> changed=false  
&nbsp;&nbsp;boto3\_version: 1.9.228  
&nbsp;&nbsp;botocore\_version: 1.12.228  
&nbsp;&nbsp;error:  
&nbsp;&nbsp;&nbsp;&nbsp;code: OptInRequired  
&nbsp;&nbsp;&nbsp;&nbsp;message: In order to use this AWS Marketplace product you need to  
accept terms and subscribe. To do so please visit  
[https://aws.amazon.com/marketplace/pp?sku=aw0evgkw8e5c1q413zgy5pjce](https://aws.amazon.com/marketplace/pp?sku=aw0evgkw8e5c1q413zgy5pjce)  
&nbsp;&nbsp;invocation:  
&nbsp;&nbsp;&nbsp;&nbsp;module\_args:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;availability\_zone: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aws\_access\_key: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aws\_secret\_key: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cpu\_credit\_specification: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cpu\_options: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug\_botocore\_endpoint\_logs: false  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;detailed\_monitoring: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ebs\_optimized: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ec2\_url: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filters:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private-ip-address: 10.1.48.4  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tag:Customer: test  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tag:Name: jumphost1  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image: null  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image\_id: ami-04cf43aca3e6f3de3

Any ideas how to accept those terms etc in a programmatic way?

thx
