Skip to Content

DVA-C02: How to Use a Parameter with AllowedValues in AWS CloudFormation

Learn how to use a parameter with AllowedValues in AWS CloudFormation to choose from a list of approved options. Find out how to create a parameter and specify the list of EC2 instance types as AllowedValues in your CloudFormation template.

Question

A developer is creating an AWS CloudFormation template to deploy Amazon EC2 instances across multiple AWS accounts. The developer must choose the EC2 instances from a list of approved instance types.

How can the developer incorporate the list of approved instance types in the CloudFormation template?

A. Create a separate CloudFormation template for each EC2 instance type in the list.

B. In the Resources section of the CloudFormation template, create resources for each EC2 instance type in the list.

C. In the CloudFormation template, create a separate parameter for each EC2 instance type in the list.

D. In the CloudFormation template, create a parameter with the list of EC2 instance types as AllowedValues.

Answer

D. In the CloudFormation template, create a parameter with the list of EC2 instance types as AllowedValues.

Explanation

The correct answer to the question is D. In the CloudFormation template, create a parameter with the list of EC2 instance types as AllowedValues.

The reason for this answer is that a parameter in a CloudFormation template allows the user to specify input values when creating or updating a stack. By using the AllowedValues property, the parameter can restrict the input values to a predefined list. This way, the developer can incorporate the list of approved EC2 instance types in the template and ensure that only those instances are deployed across multiple AWS accounts.

The other options are incorrect because:

  • Option A: Creating a separate CloudFormation template for each EC2 instance type in the list would be inefficient and redundant. It would also make it difficult to manage and update the templates across multiple AWS accounts.
  • Option B: In the Resources section of the CloudFormation template, creating resources for each EC2 instance type in the list would result in deploying all the EC2 instances in the list, regardless of the user’s input. This would waste resources and incur unnecessary costs.
  • Option C: In the CloudFormation template, creating a separate parameter for each EC2 instance type in the list would make the template too complex and cumbersome. It would also require the user to specify multiple input values when creating or updating a stack, which could lead to errors or confusion.

The latest AWS Certified Developer – Associate DVA-C02 certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the AWS Certified Developer – Associate DVA-C02 exam and earn AWS Certified Developer – Associate DVA-C02 certification.

AWS Certified Developer - Associate DVA-C02 Exam Questions and Answers

Alex Lim is a certified IT Technical Support Architect with over 15 years of experience in designing, implementing, and troubleshooting complex IT systems and networks. He has worked for leading IT companies, such as Microsoft, IBM, and Cisco, providing technical support and solutions to clients across various industries and sectors. Alex has a bachelor’s degree in computer science from the National University of Singapore and a master’s degree in information security from the Massachusetts Institute of Technology. He is also the author of several best-selling books on IT technical support, such as The IT Technical Support Handbook and Troubleshooting IT Systems and Networks. Alex lives in Bandar, Johore, Malaysia with his wife and two chilrdren. You can reach him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.