# Packer terminating AWS instance while baking AMI after installing openssl-devel package

**URL:** <https://discuss.hashicorp.com/t/packer-terminating-aws-instance-while-baking-ami-after-installing-openssl-devel-package/71780>\
**Category:** Packer\
**Created:** [December 5, 2024, 8:14am UTC](https://discuss.hashicorp.com/t/packer-terminating-aws-instance-while-baking-ami-after-installing-openssl-devel-package/71780 "2024-12-05T08:14:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kputte](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/kputte/32/44031_2.png) [@kputte](https://discuss.hashicorp.com/u/kputte)\
**Post date:** [December 5, 2024, 8:14am UTC](https://discuss.hashicorp.com/t/packer-terminating-aws-instance-while-baking-ami-after-installing-openssl-devel-package/71780/1 "2024-12-05T08:14:28Z")

</div>

Hello all,

I am using Packer v1.9.2 with Ansible as provisioner to bake AMI (Alma Linux 9) in AWS.

One of the step I am installing openssl-devel (latest) 3.2.2-6.el9\_5 and immediately after this Packer terminates the instance being used for baking AMI

```auto
amazon-ebs.ami: TASK [Install gcc, OpenSSL Devel] *********************************************
amazon-ebs.ami: ok: [Remote-Host] => (item=gcc) => {"ansible_loop_var": "item", "changed": false, "item": "gcc", "msg": "Nothing to do", "rc": 0, "results": []}
amazon-ebs.ami: changed: [Remote-Host] => (item=openssl-devel) => {"ansible_loop_var": "item", "changed": true, "item": "openssl-devel", "msg": "", "rc": 0, "results": ["Installed: openssl-1:3.2.2-6.el9_5.x86_64", "Installed: openssl-devel-1:3.2.2-6.el9_5.x86_64", "Installed: openssl-libs-1:3.2.2-6.el9_5.x86_64", "Removed: openssl-1:3.0.7-25.el9_3.x86_64", "Removed: openssl-libs-1:3.0.7-25.el9_3.x86_64"]}
amazon-ebs.ami:
amazon-ebs.ami: TASK [Next task] *********
amazon-ebs.ami: fatal: [Remote-Host]: UNREACHABLE! => {"changed": false, "msg": "No existing session", "unreachable": true}

```

However, using openssl-devel v3.0.7-28.el9\_4 works fine

Could you please help understanding the difference in the way Packer behaves with latest version of openssl package?

thanks,  
KP
