Bird
0
0

You want to create a parameter that lets users choose a VPC ID but also provides a default value. Which is the correct way to define this parameter?

hard📝 Application Q8 of 15
AWS - CloudFormation
You want to create a parameter that lets users choose a VPC ID but also provides a default value. Which is the correct way to define this parameter?
A"Parameters": {"VpcId": {"Type": "AWS::EC2::VPC::Id", "Default": "vpc-0abc1234def567890"}}
B"Parameters": {"VpcId": {"Type": "String", "Default": "vpc-0abc1234def567890"}}
C"Parameters": {"VpcId": {"Type": "AWS::EC2::Subnet::Id", "Default": "vpc-0abc1234def567890"}}
D"Parameters": {"VpcId": {"Type": "List<AWS::EC2::VPC::Id>", "Default": "vpc-0abc1234def567890"}}
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct AWS parameter type for VPC ID

    The type AWS::EC2::VPC::Id validates VPC IDs specifically.
  2. Step 2: Check default value and type compatibility

    Default value is a single VPC ID string, matching the type.
  3. Final Answer:

    Parameter with type AWS::EC2::VPC::Id and default VPC ID -> Option A
  4. Quick Check:

    Use AWS::EC2::VPC::Id type with matching default [OK]
Quick Trick: Match AWS parameter type with default value format [OK]
Common Mistakes:
  • Using String type without validation
  • Using Subnet ID type for VPC ID
  • Using List type for single value default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes