# Ansible module ec2\_ami\_copy

**URL:** <https://forum.ansible.com/t/ansible-module-ec2-ami-copy/22899>\
**Category:** Ansible Project\
**Created:** [October 27, 2016, 9:51am UTC](https://forum.ansible.com/t/ansible-module-ec2-ami-copy/22899 "2016-10-27T09:51:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cvijan\_Uros](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Cvijan\_Uros](https://forum.ansible.com/u/Cvijan_Uros)\
**Post date:** [October 27, 2016, 9:51am UTC](https://forum.ansible.com/t/ansible-module-ec2-ami-copy/22899/1 "2016-10-27T09:51:55Z")

</div>

Hi all,

I have a question regarding this module and creating encrypted image.

I have the latest version of Ansible tower,asnible, boto. On centos 7, all installed from repositories. (i even tested it with ansible 2.2 release candidate, as it says that version 2.2 is needed), but it wont work with it either.  
If i remove the encrypted and kms\_key\_id, module works. but it wont work with these two parameters.

And copying encrypted image just wont work. I get the message:

“msg”: “UnknownParameter: The parameter Encrypted is not recognized”

Can anyone provide some assistance what is it that is wrong?

Thanks,

Uros

---

<div class="post-metadata">

**Author:** ![gundalow](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gundalow/32/99_2.png) [@gundalow](https://forum.ansible.com/u/gundalow)\
**Post date:** [October 27, 2016, 4:05pm UTC](https://forum.ansible.com/t/ansible-module-ec2-ami-copy/22899/2 "2016-10-27T16:05:24Z")

</div>

Hi,

1. Just checking, are you using “encrypted” (lowercase)

2. Can you please provide the output of:  
ansible-playbook --version

3. Can you please copy & paste just the failing task from your playbook (remembering to remove any sensitive data)

FYI the code to add int encrypted and kms\_key\_id was added at the end of May by [Add encryption capability to AMI copy (#1409) · ansible/ansible-modules-extras@0ba3443 · GitHub](https://github.com/ansible/ansible-modules-extras/commit/0ba34435cf6896a6bcf1039cb04fde0d426fad4e#diff-f3b7742028fc91b33de9fee0daabc496)

Thanks,  
John Barker

---

<div class="post-metadata">

**Author:** ![Cvijan\_Uros](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Cvijan\_Uros](https://forum.ansible.com/u/Cvijan_Uros)\
**Post date:** [October 28, 2016, 7:19am UTC](https://forum.ansible.com/t/ansible-module-ec2-ami-copy/22899/3 "2016-10-28T07:19:27Z")

</div>

Hi John,

Thank you for reply.

1. yes, it is all lower case, you will see in the playbook itself.

2. ansible-playbook --version  
ansible-playbook 2.2.0.0  
config file = /etc/ansible/ansible.cfg  
configured module search path = Default w/o overrides

This is installed on separate server for testing purposes. But this happened with every release i tried, even with the 3.0, from git, and with latest stable from repository.

1. This is the playbook:

---

<div class="post-metadata">

**Author:** ![Cvijan\_Uros](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Cvijan\_Uros](https://forum.ansible.com/u/Cvijan_Uros)\
**Post date:** [November 3, 2016, 3:35pm UTC](https://forum.ansible.com/t/ansible-module-ec2-ami-copy/22899/4 "2016-11-03T15:35:17Z")

</div>

Hi John,

Do you maybe know something more based on the answers below?
