SOA-C02 · Question #354
Lab Simulation 3 You want to update an existing AWS CloudFormation stack. If needed, a copy of the CloudFormation template is available in an Amazon SB bucket named cloudformation-bucket 1. Use the…
This is a lab simulation question, meaning all three items (A, B, C) are required tasks - not competing answer choices. The correct response is to implement all three changes by modifying the CloudFormation template from the S3 bucket (cloudformation-bucket) and running a stack…
Question
Exhibit
Options
- AChange the EC2 instance type to us-east-t2.nano.
- BAllow SSH to connect to the EC2 instance from the IP address range 192.168.100.0/30.
- CReplace the instance profile IAM role with IamRoleB.
Explanation
This is a lab simulation question, meaning all three items (A, B, C) are required tasks - not competing answer choices. The correct response is to implement all three changes by modifying the CloudFormation template from the S3 bucket (cloudformation-bucket) and running a stack update on stack 1700182 in us-east-2.
What each task requires in the template:
- A - Change the
InstanceTypeproperty tot2.nano(note: "us-east-t2.nano" in the question is a typo; instance types never include region prefixes). - B - Update the Security Group resource to add an inbound rule for port 22 (SSH) with CIDR
192.168.100.0/30(a /30 covers 4 IPs: .0–.3, with 2 usable hosts). - C - Update the
IamInstanceProfileproperty of the EC2 resource to referenceIamRoleBinstead of the current role.
After editing the template, you update the stack via the CloudFormation Console ("Update stack" → "Replace current template" → upload modified template) or via CLI with aws cloudformation update-stack.
Memory tip: For CloudFormation stack updates, think "S3 → Edit → Update" - grab the template from S3, edit the three properties (InstanceType, SecurityGroup CIDR, IamInstanceProfile), then push the update. CloudFormation will only replace/modify resources that actually changed.
Topics
Community Discussion
No community discussion yet for this question.
