Here's my batch file:
@echo off
set rdslist=rds-instance-1 rds-instance-2
:retryaction
set /P action=Would you like to (1)start or (2)stop these instances %rdslist%:
IF %action%==1 (
set command=start
goto :start
)
IF %action%==2 (
set command=stop
goto :start
)
goto :retryaction
:start
(for %%a in (%rdslist%) do (
aws rds %command%-db-instance --db-instance-identifier %%a
))
pause
It doesn't pause after I run it, but if I place the pause before or inside the for loop it pauses.
awstocall aws.gotoshould only affect script execution when the label iseof...