AMI 列表的 Cloudformation 参数

Cloudformation parameter for list of AMIs

我正在通过自动缩放组为 ecs 集群创建 cloudformation。在 Auto Scaling 组的启动配置中,我希望可以选择指定 ECS 优化的 AMI Id。现在我有以下参数:

"AutoScalingGroupImageId": {
   "Default" : "/aws/service/ami-windows-latest/Windows_Server-2016-English-Full-SQL_2017_Standard",
   "Description" : "The AMI Id to be specified for the ASG",
   "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>"            
}

它需要类似于 List<AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>>,我可以从中为所需的 windows 服务器选择 AMI Id。

List<AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>> 等构造正式不支持。来自 docs:

AWS CloudFormation doesn't support the following SSM parameter type: Lists of SSM parameter types—for example:

List<AWS::SSM::Parameter::Value<String>>

ECS 实例的 AMI

  ECSOptmizedAMI:
    Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
    Default: /aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id

以上是根据AWS docs.