# ec2: Why parameter "key\_name" is mandatory required?

**URL:** <https://forum.ansible.com/t/ec2-why-parameter-key-name-is-mandatory-required/14324>\
**Category:** Ansible Developer\
**Created:** [January 11, 2014, 10:40pm UTC](https://forum.ansible.com/t/ec2-why-parameter-key-name-is-mandatory-required/14324 "2014-01-11T22:40:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Lov](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Alex\_Lov](https://forum.ansible.com/u/Alex_Lov)\
**Post date:** [January 11, 2014, 10:40pm UTC](https://forum.ansible.com/t/ec2-why-parameter-key-name-is-mandatory-required/14324/1 "2014-01-11T22:40:35Z")

</div>

(copy-paste from [https://github.com/ansible/ansible/issues/5579](https://github.com/ansible/ansible/issues/5579))

Subj.  
As I can see in code, this module uses boto function run\_instance(), and in this function parameter “key\_name” is not required for creating new instance.

In my case, I already have my own ami with pre-configured ssh key inside it and I don’t want change it or add new one when launching new instance.

Maybe parameter “key\_name” in module ec2 should be optional? Or how I can avoid this requirements?

---

<div class="post-metadata">

**Author:** ![willthames](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@willthames](https://forum.ansible.com/u/willthames)\
**Post date:** [January 13, 2014, 11:20pm UTC](https://forum.ansible.com/t/ec2-why-parameter-key-name-is-mandatory-required/14324/2 "2014-01-13T23:20:21Z")

</div>

I don’t think it needs to be mandatory - if it’s not mandatory in boto, it shouldn’t be in ansible either.

[https://github.com/ansible/ansible/pull/5603](https://github.com/ansible/ansible/pull/5603)

Will
