Bird
0
0

You wrote this AWS CLI command to associate an Elastic IP but it fails:

medium📝 Debug Q7 of 15
AWS - EC2 Fundamentals
You wrote this AWS CLI command to associate an Elastic IP but it fails:
aws ec2 associate-address --instance-id i-1234567890abcdef0 --allocation-id eipalloc-12345678
What is a possible error?
AThe allocation ID is invalid syntax
BThe instance is in a different VPC than the Elastic IP allocation
CThe instance ID is missing a region prefix
DThe command requires a public IP instead of allocation ID
Step-by-Step Solution
Solution:
  1. Step 1: Understand association requirements

    Elastic IPs allocated for a VPC must be associated with instances in the same VPC.
  2. Step 2: Evaluate other options

    Allocation ID syntax is correct; instance ID format is valid; command uses allocation ID correctly.
  3. Final Answer:

    The instance is in a different VPC than the Elastic IP allocation -> Option B
  4. Quick Check:

    Elastic IP and instance must be in same VPC [OK]
Quick Trick: Elastic IP and instance must share the same VPC [OK]
Common Mistakes:
MISTAKES
  • Ignoring VPC mismatch
  • Thinking allocation ID syntax is wrong
  • Confusing instance ID format requirements

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes