我开始使用AWS System Manager(SSM)的自动化文档,但我需要定义AMI-id,我想创建一个下拉列表,以便仅提供基于该区域的可用AMI。
我知道唯一允许的SSM参数类型是 String 或 StringList 。
我测试了允许的值,但根本不起作用:
{
"description":"Systems Manager Automation Demo - Patch and Create a New AMI",
"schemaVersion":"0.3",
"assumeRole":"arn:aws:iam::ACCOUNT_ID:role/AutomationServiceRole",
"parameters":{
"AMIID":{
"type":"String",
"description":"Instance to value",
"allowedValues" : [ "ami-5648ad2c", "ami-5648ad33", "ami-5238ad2c", "ami-5238ad2c" ]
}
},
"mainSteps":[
{
"name":"launchInstances",
"action":"aws:runInstances",
"timeoutSeconds":1200,
"maxAttempts":1,
"onFailure":"Abort",
"inputs":{
"ImageId":"{{ AMIID }}",
"InstanceType":"t2.micro",
"KeyName":"accenture",
"MinInstanceCount":1,
"MaxInstanceCount":1,
"IamInstanceProfileName":"ManagedAMIProfile"
}
}
]
}