Hello
Depending on what you wan, you will think to build a pipeline.
If you want to package ami, then on packer you can do
Packer:
Base AMI -> Intermediate AMI -> Install product A / run scripts -> AMI for product A
Base AMI -> Intermediate AMI -> Install product B / run scripts -> AMI for product B
Base AMI -> Intermediate AMI -> Install product C / run scripts -> AMI for product C
And you will end with r 4 AMI, base + 4 product.
If what you want is take a base AMI and start a box that will be a server.
Then packer may not bet the tool you are after.
Have a look at terraform to create a EC2 server and you could use a provision script to configure the server.
Alvaro