AWS DevOps Engineer Professional Exam: CloudFormation Stack for Continuous Deployment

Dedicated Virtual Machines for Third-Party Software Installation

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 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: In this scenario, the requirement is to bind a third-party software license to dedicated virtual machines, which means the software should be installed on the same physical hosts whenever the CloudFormation stack is redeployed. To achieve this, we need to use dedicated hosts.

Option A: Configuring an AWS::EC2::Host resource in the CloudFormation template would allocate a fully dedicated physical server when launching EC2 instances for the application, but it does not guarantee that the same physical host will be used every time the stack is redeployed. Therefore, it does not meet the requirement of binding the software license to dedicated virtual machines.

Option C: Configuring EC2 instances to be dedicated instances for the single customer by specifying the tenancy value to be dedicated in the CloudFormation template would guarantee that the instances are launched on dedicated hardware, but it would not guarantee that the same physical host is used every time the stack is redeployed.

Option D: Defining a custom VPC and ensuring that the instance tenancy attribute of the VPC is dedicated in the CloudFormation template would launch EC2 instances from the VPC with dedicated tenancy, but it does not guarantee that the same physical host is used every time the stack is redeployed.

Option B is the correct answer because allocating dedicated hosts for the application would guarantee that the EC2 instances are launched on the same physical hosts every time the stack is redeployed. In the CloudFormation template, we can specify the allocated HostID and configure the tenancy type to be a dedicated host, which ensures that the EC2 instances launched from the CloudFormation stack are bound to the same physical host every time.