I don't know, it 's possible or not. I have a ClodFormation template and I want to install my image from Marketplace. But there is a problen when I upload a new image, the image id changes. I want to do this automatically. I can fetch my image id as below the line.
So I want to ask, how can I do in CloudFormation template? Because there will be different zones.
aws ec2 describe-images --filters Name=product-code,Values=$image_id Name=is-public,Values=true
Thanks for your answer.