AWS DevOps Engineer Professional DOP-C01 – Question345

You need to create a Route53 record automatically in CloudFormation when not running in production during all launches of a Template.
How should you implement this?

A.
Use a <code>Parameter</code> for <code>environment</code>, and add a <code>Condition</code> on the Route53 <code>Resource</code> in the template to create the record only when <code>environment</code> is not <code>production</code>.
B. Create two templates, one with the Route53 record value and one with a null value for the record. Use the one without it when deploying to production.
C. Use a <code>Parameter</code> for <code>environment</code>, and add a <code>Condition</code> on the Route53 <code>Resource</code> in the template to create the record with a null string when <code>environment</code> is <code>production</code>.
D. Create two templates, one with the Route53 record and one without it. Use the one without it when deploying to production.

Correct Answer: A

Explanation:

Explanation:
The best way to do this is with one template, and a Condition on the resource. Route53 does not allow null strings for records.
Reference: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/condi…