How to create an ami that supports IMDSV1 from a base ami that only supports IMDSV2

I have a base aws ami which only supports IMDSV2. I want to use packer to create a new ami on the top of it. But I want the new ami to support IMDSV1.

One way to do it is to deploy the base ami to an EC2 instance and then register a new ami which supports IMDSV1. Then use this new ami as base ami. That is purely manual work.

Is it possible to get that done with packer? Thanks.