0

The user data on Windows EC2 works as expected when EC2 is launched programmatically by Lambda. However, it also executes when I manually start the machine and RDP into it for debugging/troubleshooting purposes. Is there a way to make sure it doesn't run when I start EC2 and RDP to it?

GGG
  • 125
  • 4
  • 12

1 Answers1

0

Well, EC2 user data doesn't differentiate between programmatic and manual launching. Commenting out user data script before RDP'ing into EC2 looks like the only way to prevent user data script from running.

GGG
  • 125
  • 4
  • 12
  • It runs at startup, not login. RDP doesn't have anything to do with it. The "manual launching" is what is triggering the user data script. – Mark B Jul 18 '22 at 19:29
  • Thanks Mark B, I should've said "before launching and RDP'ing into EC2". – GGG Jul 20 '22 at 20:16