Parameters

The Parameters section defines the parameters we need to specify when deploying the template. In our scenario, the "KeyName" parameter defines that we need to select an existing key pair to log in to the instance:

"Parameters" : {
"KeyName": {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type": "AWS::EC2::KeyPair::KeyName",
"ConstraintDescription" : "Must be an existing EC2 KeyPair."
},

Next, the "Instancetype" parameter allows us to choose an instance type from a few available options. The "AllowedValues" parameter defines the instance types we can select:

"InstanceType" : {
"Description" : "The EC2 instance type",
"Type" : "String",
"Default" : "t2.micro",
"AllowedValues" : [ "t2.micro", "t2.small", "t2.medium", "t2.large"],
"ConstraintDescription" : "Must be one of the t2 EC2 instance types."
}
},
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.196.244