# Stop source/destination check of an Instance

**URL:** <https://forum.ansible.com/t/stop-source-destination-check-of-an-instance/38268>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [July 27, 2023, 4:50pm UTC](https://forum.ansible.com/t/stop-source-destination-check-of-an-instance/38268 "2023-07-27T16:50:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faizan](https://avatars.discourse-cdn.com/v4/letter/f/f0a364/32.png) [@Faizan](https://forum.ansible.com/u/Faizan)\
**Post date:** [July 27, 2023, 4:50pm UTC](https://forum.ansible.com/t/stop-source-destination-check-of-an-instance/38268/1 "2023-07-27T16:50:38Z")

</div>

I am calling a global role in the main file to spin up an ec2 instance in the aws then i want to use local role to stop the source/destination check for that instance. I am not finding a way to do it using any of the ansible module. Could you please suggest me the module if there is any module. The error i get is

**An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.NoCredentialsError: Unable to locate credentials**  
**fatal: [localhost → 54.149.210.58]: FAILED! =\> {“boto3\_version”: “1.28.11”, “botocore\_version”: “1.31.11”, “changed”: false, “msg”: “Failed to get vpc\_id for subnet-A1B2c34: Unable to locate credentials”}**

I used **amazon.aws.ec2\_instance,**  **amazon.aws.ec2\_eni** and **command as well** in below mentioned way;

- name: Stop Source/Destination Check for EC2 instance  
become: true  
command: “aws ec2 modify-instance-attribute --instance-id {{ instance\_id }} --no-source-dest-check”  
One thing to be noted is the ansible-server and the new server which i am deploying are in the same subnet. Also the ansible-server has admin access.

---

<div class="post-metadata">

**Author:** ![atul\_mohan](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@atul\_mohan](https://forum.ansible.com/u/atul_mohan)\
**Post date:** [August 19, 2023, 6:07pm UTC](https://forum.ansible.com/t/stop-source-destination-check-of-an-instance/38268/2 "2023-08-19T18:07:57Z")

</div>


