我几天前开始使用AWS。AWS:使用Cloud Formation和现有密钥对部署堆栈
我想使用Cloud Formation服务部署一个堆栈,然后能够将SSH部署到部署的实例中。在创建模板时,我没有看到包含密钥对的选项。
根据this,我需要从一开始就有一个密钥对。
如何使用密钥对部署堆栈,以便在部署完成后可以进入SSH?
我也试图通过增加下的参数键名段改变在一个文本文件的模板:
"Parameters" : {
"AccessControl" : {
"Description" : " The IP address range that can be used to access the CloudFormer tool. NOTE: We highly recommend that you specify a customized address range to lock down the tool.",
"Type": "String",
"MinLength": "9",
"MaxLength": "18",
"Default": "0.0.0.0/0",
"AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})",
"ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x."
}
"KeyName" : {
"Description" : " Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "String",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern": "[-_ a-zA-Z0-9]*",
"ConstraintDescription": "Can contain only alphanumeric characters, spaces, dashes, and underscores."
}
这将导致以下错误:“模板验证错误:模板格式错误:JSON格式不正确“。
我希望能够远程访问Linux和Windows实例。
谢谢你,我的作品。 :) – Kino