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 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南