AWS DevOps Engineer - Professional Exam: CloudFormation Stack for Continuous Deployment

CloudFormation Stack for Continuous Deployment

Prev Question Next Question

Question

Your team is developing an application for a government project.

For continuous deployment, you have built a CloudFormation stack to deploy EC2 instances.

A third party software is installed in the instances and its license requires that the software should be bound to dedicated virtual machines.

Whenever the CloudFormation stack is redeployed, the software should be installed in the same physical hosts.

Which method would you select to achieve this requirement?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - B.

In order to launch EC2 instances on the same physical machines, EC2 dedicated hosts should be used.

Check the overview of dedicated hosts in https://aws.amazon.com/ec2/dedicated-hosts/.

Option A is incorrect: The AWS::EC2::Host resource creates a dedicated host.

However you should not create a new dedicated host every time when launching EC2 instances.

Option B is CORRECT: Because you can specify the HostId and Tenancy properties in AWS::EC2::Instance for launching instances on dedicated hosts.

Option C is incorrect: Because the tenancy value should be host instead of dedicated.

Dedicated instances may still share hardware with other instances from the same AWS account.

Dedicated hosts should be used.

Option D is incorrect: With this configuration, instances launched into this custom VPC are dedicated instances by default.

However, the instances of dedicated hosts should be launched in this scenario.

The correct answer to this question is B. Allocate dedicated hosts for this application which allow you to reliably launch EC2 instances on the same physical servers. In the CloudFormation template, specify the allocated HostID and configure the tenancy type to be dedicated host.

Explanation: This question requires you to maintain the physical server for the EC2 instances to ensure the third-party software's license agreement is maintained. Therefore, you need to ensure that the instances are deployed to the same physical host whenever the CloudFormation stack is redeployed.

To achieve this, you can use AWS Dedicated Hosts, which allow you to launch EC2 instances on the same physical servers. When you allocate a dedicated host, AWS ensures that the instances launched on that host are isolated from instances launched on other dedicated hosts.

In the CloudFormation template, you can specify the allocated HostID and configure the tenancy type to be dedicated host. By doing so, you can ensure that the EC2 instances are launched on the same physical host whenever the CloudFormation stack is redeployed. This ensures that the third-party software is installed on the same physical host as before and that the license agreement is maintained.

Option A is incorrect because AWS::EC2::Host resource creates a new Dedicated Host for the specified Availability Zone and Instance Type. It doesn't allow you to launch EC2 instances on the same physical servers.

Option C is incorrect because EC2 Dedicated Instances are designed to run on hardware that is dedicated to a single customer. However, it doesn't ensure that instances are launched on the same physical server when the CloudFormation stack is redeployed.

Option D is incorrect because modifying the instance tenancy attribute of a VPC to dedicated ensures that all instances launched in that VPC are dedicated instances. It doesn't guarantee that the instances are launched on the same physical server when the CloudFormation stack is redeployed.