Image Builder via CloudFormation - get latest AMI ID for Windows

0

I have an image pipeline for Windows 2019 CIS Image. I have deployed a Lambda that looks up for latest CIS image and puts it in a SSM parameter.

In the image recipe (AWS::ImageBuilder::ImageRecipe) I have used the property: ParentImage: '{{resolve:ssm:/EC2/WIN2019CIS_AMI_ID}}'

This solution works however when I look at the Image recipe in the console, it looks like the ami-id gets hard coded in the recipe. So then next time when the image pipeline runs it will not get the new AMI from the SSM parameters.

I need to find a solution so when the next time the image builder runs, next month, it shoul fetch the latest ami from the SSM parameter.

The image I am after is - Windows 2019 CIS image. Looking for suggestions, thanks.

SSHOAIB
已提问 9 个月前134 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则