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
asked 8 months ago130 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions