Question 428:
A designer is preparing for a demo to the development lead. He is using a Cloudformation template as the template could be version controlled. He wants the template to be able to get the SSH Key as a user input in order to SSH to an EC2 instance that will be created by the Cloudformation stack later on. Which below approach is the proper one to make this happen?
Answer options:
A.Design the template using XML format and add a parameter as the SSH Key. Refer to this parameter for new EC2 instances. B.Use an editor to write a template using JSON or YAML. Add a parameter section for the SSH Key such as “MyKeyPair”. For new instances, use the keyword of “Ref” to use this parameter. Save the template in S3 and upload it during stack creation. C.In the template editor that has been provided by AWS, design the template using JSON or YAML. Add a parameter for the SSH Key such as “MyKeyPair”. For new instances, use the keyword “Reference” to link to the “key” parameter. D.Design the template using XML format. Add a parameter called “MyKeyPair” with the “Type” as “Key”. For new EC2 instances, use the keyword of “Ref” to refer to this parameter in the Metadata section. Save the template in a S3 and refer to the S3 link during stack creation.