User data is a script you provide when launching an EC2 instance that runs automatically on first boot — used to install software, apply configuration, or bootstrap the instance without manual steps.

The tell

When a scenario needs instances to self-configure at launch (install a web server, pull config, join a cluster) automatically — especially with Auto Scaling launching new instances — that’s user data in the launch template. It runs once at first boot by default.

Test yourself

Practice question

Auto Scaling launches new EC2 instances that must automatically install and configure a web server on startup, with no manual steps. What achieves this?

  1. Manually SSH into each new instance
  2. An EC2 user-data bootstrap script in the launch template
  3. A larger instance type
  4. An Elastic IP
👉 Click to reveal the answer & explanation

Correct answer: B. User data runs a bootstrap script automatically on first boot, so new instances self-configure — essential with Auto Scaling. Manual SSH (A) doesn’t scale; instance size (C) and Elastic IPs (D) don’t configure software.

Related topics

Amazon EC2 · Auto Scaling · EC2 Instance Types

CloudExamPro Premium

Ready to pass your AWS exam?

Stop guessing whether you’re ready. Our full-length, exam-realistic practice exams put you through the exact question style you’ll face — with a detailed explanation behind every answer, so you learn why, not just what.

  • ✓  6 full-length practice exams
  • ✓  A detailed explanation for every single question
  • ✓  Realistic, scenario-based questions — not memory dumps
  • ✓  Lifetime access, kept current for 2026

See the Practice Exam Packs →

Limited-time offer · ends in --Days:--Hrs:--Min:--Sec
Get Instant Access