ExamQuestions.com

Register
Login
AWS Certified DevOps Engineer Professional Exam Questions

Amazon

AWS Certified DevOps Engineer Professional

462 / 500

Question 462:

You are a DevOps engineer and you need to design a CloudFormation stack to manage AWS resources. You want to use the same CloudFormation template for both production and development environments. The stack includes an EC2 instance whose instance type should be c1.xlarge for production and m1.large for development. You have a Condition resource called CreateProdResources that determines whether or not the environment is production. The template uses the YAML format. How would you configure the EC2 instance type in the CloudFormation template?

Answer options:

A.EC2Instance:
Type: "AWS::EC2::Instance"
Condition: CreateProdResources
Properties:
InstanceType: !Ref [c1.xlarge, m1.large]
B.EC2Instance:
Type: "AWS::EC2::Instance"
Properties:
InstanceType: !If [CreateProdResources, c1.xlarge, m1.large] 
C.EC2Instance:
Type: "AWS::EC2::Instance"
Properties:
InstanceType: Fn::Not: [CreateProdResources, m1.large, c1.xlarge]
D.EC2Instance:
Type: "AWS::EC2::Instance"
Properties:
InstanceType: !Equals [CreateProdResources, c1.xlarge, m1.large]