Cloudformation templates: Create a VPC (containing public subnets, private subnets, respectively, in different AZ), creating Nat,bastion server on the public subnet.
1. Modify and run the AWS Cloudformation template
1.1 Adding an Ami ID to a template
1.1.1 Download Template
Https://d2lrzjb0vjvpn5.cloudfront.net/sys-ops/v2.4/lab-7-automating/static/Lab-7-Start-CF.template
1.1.2 Replace ImageId ("ImageId": "Ami-b5a7ea85"), as follows
"ImageId": { "Fn::findinmap": [ "Amazonlinuxami", { "Ref": "Aws::region" }, "AMI" ]}
1.2 Running the template
1.2.1 Copy key pair name
1.2.2 Running a template
2. Update the stack with a new template
2.1 Adding the Instancetype parameter to the template
Add highlight section to parameter section
"Parameters": {"Bastionhostkeyname": {"Type": "String", "Description": "The name of the private key file to U SE for SSH/RDP access to the bastion host. "}," Bastionsecuritycidr ": {" Type ":" String "," Description ":" The C IDR range to use-lock down security on the bastion host. "," Default ":" 0.0.0.0/0 "}, " Bastioninstancetype ": {"Type": "String", "Description": "The size of the instance to use for the bastion host." }}
Modify "Instancetype" in Bastionserver section: "T2.small" as
"Instancetype": { "Ref": "Bastioninstancetype"}
2.2 Update already exists stack
Check the instance Type of Bastion server
System Operations on Aws-lab 7-cloudformation